parameters: (self)
return_statement: return credential
docstring: Retrieve Credential from datastore.
  
      Returns:
        oauth2client.Credentials
docstring_summary: Retrieve Credential from datastore.
docstring_tokens: Retrieve Credential from datastore .
function: def locked_get(self):
      """Retrieve Credential from datastore.
  
      Returns:
        oauth2client.Credentials
      """
      credential = None
  
      query = {self.key_name: self.key_value}
      entities = self.model_class.objects.filter(**query)
      if len(entities) > 0:
        credential = getattr(entities[0], self.property_name)
        if credential and hasattr(credential, 'set_store'):
          credential.set_store(self)
      return credential
function_tokens: def locked_get ( self ) : credential = None query = { self . key_name : self . key_value } entities = self . model_class . objects . filter ( * * query ) if len ( entities ) > 0 : credential = getattr ( entities [ 0 ] , self . property_name ) if credential and hasattr ( credential , 'set_store' ) : credential . set_store ( self ) return credential