<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _get_memory_contents(self):
 """Runs the scheduler to determine memory contents at every point in time. Returns: a list of frozenset of strings, where the ith entry describes the tensors in memory when executing operation i (where schedule[i] is an index into GetAllOperationNames()). """

    if self._memory_contents is not None:
      return self._memory_contents

    schedule = scheduler.minimize_peak_memory(self._graph, self._scheduler_alg)
    self._memory_contents = self._graph.compute_memory_contents_under_schedule(
        schedule)

    return self._memory_contents