parameters: (cls, user, resource_id, value)
docstring: Get a related entity.
docstring_summary: Get a related entity.
docstring_tokens: Get a related entity .
function: def get(cls, user, resource_id, value):
          """Get a related entity."""
          kwargs = {'user_id': user.user_id,
                    'resource_id': resource_id,
                    cls._pkey_name: value}
          try:
              obj = cls._model_class.get(**kwargs)
              return cls(obj)
          except Exception as exc:
              log.exception('Unexpected error during retrieve of resource %s'
                            % exc)
              return None
function_tokens: def get ( cls , user , resource_id , value ) : kwargs = { 'user_id' : user . user_id , 'resource_id' : resource_id , cls . _pkey_name : value } try : obj = cls . _model_class . get ( * * kwargs ) return cls ( obj ) except Exception as exc : log . exception ( 'Unexpected error during retrieve of resource %s' % exc ) return None