Decodes a string into a schedule tuple.

  Args:
    string: The string encoding of a schedule tuple.

  Returns:
    A schedule tuple, see encode_schedule for details.

def decode_schedule(string):
  """Decodes a string into a schedule tuple.

  Args:
    string: The string encoding of a schedule tuple.

  Returns:
    A schedule tuple, see encode_schedule for details.
  """
  splits = string.split()
  steps = [int(x[1:]) for x in splits[1:] if x[0] == '@']
  pmfs = np.reshape(
      [float(x) for x in splits[1:] if x[0] != '@'], [len(steps), -1])
  return splits[0], tuplize(steps), tuplize(pmfs)