'Retrieve Credential from datastore.
Returns:
oauth2client.Credentials'

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
