def lookup_package(self, definition_name):
    while True:
      descriptor = self.lookup_descriptor(definition_name)
      if isinstance(descriptor, FileDescriptor):
        return descriptor.package
      else:
        index = definition_name.rfind('.')
        if index < 0:
          return None
        definition_name = definition_name[:index]
Determines the package name for any definition.
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/protorpc/protorpc/descriptor.py/DescriptorLibrary.lookup_package