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