| 2797 | } |
| 2798 | |
| 2799 | const char* GetDeviceName(PyObject* py_device_name) { |
| 2800 | if (py_device_name != Py_None) { |
| 2801 | return TFE_GetPythonString(py_device_name); |
| 2802 | } |
| 2803 | return nullptr; |
| 2804 | } |
| 2805 | |
| 2806 | bool RaiseIfNotPySequence(PyObject* seq, const string& attr_name) { |
| 2807 | if (!PySequence_Check(seq)) { |
no test coverage detected