<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def GetValuesForAttribute(self, attribute, only_one=False):
 """Returns a list of values from this attribute."""

    if not only_one and self.age_policy == NEWEST_TIME:
      raise ValueError("Attempting to read all attribute versions for an "
                       "object opened for NEWEST_TIME. This is probably "
                       "not what you want.")

    if attribute is None:
      return []

    elif isinstance(attribute, string_types):
      attribute = Attribute.GetAttributeByName(attribute)

    return attribute.GetValues(self)