def _GetEndpointsMethodDecorator(decorator_name, modelclass, **kwargs):
  if decorator_name not in ALLOWED_DECORATOR_NAME:
    raise TypeError('Decorator %s not allowed.' % (decorator_name,))

  # Import here to avoid circular imports
  from .ndb import model
  if IsSubclass(modelclass, model.EndpointsModel):
    return getattr(modelclass, decorator_name)(**kwargs)

  raise TypeError('Model class %s not a valid Endpoints model.' % (modelclass,))
Tests aliased symbols in type annotations.
dataset/ETHPy150Open GoogleCloudPlatform/endpoints-proto-datastore/endpoints_proto_datastore/utils.py/_GetEndpointsMethodDecorator--crossover with--dataset/ETHPy150Open google/closure-linter/closure_linter/closurizednamespacesinfo_test.py/ClosurizedNamespacesInfoTest.testScope_usedTypeAlias