def _LoadHandler(self):
    """Find and return a Python object with name handler_name.

    Find and return a Python object specified by self._handler. Packages and
    modules are imported as necessary. If successful, the filename of the module
    is inserted into environ with key 'PATH_TRANSLATED' if it has one.

    Returns:
      A Python object.

    Raises:
      ImportError: An element of the path cannot be resolved.
    """
    path = self._handler.split('.')
    handler = __import__(path[0])
    is_parent_package = True
    cumulative_path = path[0]
    for name in path[1:]:
      if hasattr(handler, '__file__'):
        self._environ['PATH_TRANSLATED'] = handler.__file__
      is_parent_package = is_parent_package and hasattr(handler, '__path__')
      cumulative_path += '.' + name
      if hasattr(handler, name):
        handler = getattr(handler, name)
      elif is_parent_package:
        __import__(cumulative_path)
        handler = getattr(handler, name)
      else:
        raise ImportError((handler, name) % '%s has no attribute %s')


    return handler
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/runtime/wsgi.py/WsgiRequest._LoadHandler/swapped operands of `%`