code: def validate(self):
          
          if not isinstance(self.location, Location):
              raise TypeError(u'Expected Location location, got: {} {}'
                              .format(type(self.location).__name__, self.location))
  
          if self.location.field is None:
              raise AssertionError(u'Received Location without a field: {}'
                                   .format(self.location))
  
          if not is_graphql_type(self.field_type):
              raise ValueError(u'Invalid value of "field_type": {}'.format(self.field_type))
docs: Validate that the GlobalContextField is correctly representable.