def GetDeferGroups(env):
  """Returns the dict of defer groups from the root defer environment.

  Args:
    env: Environment context.

  Returns:
    The dict of defer groups from the root defer environment.
  """
  return env.GetDeferRoot()['_DEFER_GROUPS']