| 150 | } |
| 151 | |
| 152 | Status ImportFromModule(PyObject* module, const std::string& name, OwnedRef* ref) { |
| 153 | PyObject* attr = PyObject_GetAttrString(module, name.c_str()); |
| 154 | RETURN_IF_PYERROR(); |
| 155 | ref->reset(attr); |
| 156 | return Status::OK(); |
| 157 | } |
| 158 | |
| 159 | namespace { |
| 160 |