def _get_global_variable_names(name, tuple_path):
  """Get the global variables names for ground truth.

  Args:
    name: Python `str`. Name of the sample transformation.
    tuple_path: Tuple path of the part of the ground truth we're saving. See
      `nest.flatten_with_tuple_paths`.

  Returns:
    mean_name: Variable name to use for the mean.
    sem_name: Variable name to use for the standard error of the mean.
    std_name: Variable name to use for the standard deviation.
    sestd_name: Variable name to use for the standard deviation standard error.
  """
  if tuple_path:
    path_suffix = '_' + '_'.join(str(p).upper() for p in tuple_path)
  else:
    path_suffix = ''

  upper_name = name.upper()
  mean_name = '{}{}_MEAN'.format(upper_name, path_suffix)
  sem_name = '{}{}_MEAN_STANDARD_ERROR'.format(upper_name, path_suffix)
  std_name = '{}{}_STANDARD_DEVIATION'.format(upper_name, path_suffix)
  sestd_name = '{}{}_STANDARD_DEVIATION_STANDARD_ERROR'.format(
      upper_name, path_suffix)

  return mean_name, sem_name, std_name, sestd_name