def GetRDFValueType(self):
    """Returns this attribute's RDFValue class."""
    result = self.attribute_type
    for field_name in self.field_names:
      # Support the new semantic protobufs.
      if issubclass(result, rdf_structs.RDFProtoStruct):
        try:
          result = result.type_infos.get(field_name).type
        except __HOLE__:
          raise AttributeError("Invalid attribute %s" % field_name)
      else:
        # TODO(user): Remove and deprecate.
        # Support for the old RDFProto.
        result = result.rdf_map.get(field_name, rdfvalue.RDFString)

    return result
dataset/ETHPy150Open google/grr/grr/lib/aff4.py/Attribute.GetRDFValueType