def _attr_name(name, private=False):
  """Returns an attribute name, prefixed with an underscore if private.

  Args:
    name: The name of the attribute.
    private: True if the attribute should be private.
  Returns: The attribute name, prefixed with an underscore if private.
  """
  return ("_" + name) if private else name