<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _initialize_operations(self):
 """Initializer for _operations. Raises: TypeError: _graph is not a tf.Graph or mtf.Graph. Returns: a list of (tf.Operation or mtf.Operation) """

    if isinstance(self._graph, tf.Graph):
      return self._graph.get_operations()
    elif isinstance(self._graph, mtf.Graph):
      return self._graph.operations
    else:
      raise TypeError('Graph is not tf.Graph or mtf.Graph: {}'
                      .format(type(self._graph)))