code: def minimize_peak_memory(graph, scheduler_alg):
      """Computes a schedule to minimize peak memory.
  
      Args:
        graph: an mtf.auto_mtf.graph_interface.GraphInterface.
        scheduler_alg: a string, one of 'NAIVE' or 'LIST'
  
      Returns:
        an iterable of integers representing the schedule.
      """
      if scheduler_alg == "NAIVE":
          return _minimize_peak_memory_naive(graph)
      elif scheduler_alg == "LIST":
          return _minimize_peak_memory_list(graph)
      else:
          raise NotImplementedError(
              "{} is not a scheduler algorithm. It should be "
              "one of NAIVE or LIST.".format(scheduler_alg)
          )
  
file_path: mesh/mesh_tensorflow/auto_mtf/scheduler.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  import heapq
  import six
label_desc: Use image node_id 1 for calling a global function with example usage: minimize_peak_memory(graph, scheduler_alg) and returns: _minimize_peak_memory_naive, _minimize_peak_memory_list