def METHOD_NAME(field_name, allow_override_from_cluster=False):
  """Get 'field_name' from a global configuration object.
  Currently the global configuration object used is FLAGS, but this may
  change to Cluster() or an equivalent stack-scoped config object.
  Args:
    field_name: The string field name to look up.
    allow_override_from_cluster: Allow the Cluster() to override FLAGS.
  Returns:
    The value associated with the global configuration string 'field_name'.
  """
  if allow_override_from_cluster:
    cluster = cluster_factory.Current()
    if field_name in cluster.params:
      params_value = cluster.params.Get(field_name)
      # Return the value in the cluster params if it is not None
      if params_value is not None:
        return params_value
  # Now check the FLAGS object for backwards compatibility.
  #
  # If not explicitly set, get the field from the FLAGS object.  If FLAGS
  # have not been parsed yet, the default value of the flag will be used.
  return FLAGS[field_name].value