'Always first try to search by `ID`, if ID isn\'t specified,
check if user constructed special search in `search_params`,
if not search by `name`.'

def search_entity(self, search_params=None):

    entity = None
    if (('id' in self._module.params) and (self._module.params['id'] is not None)):
        entity = search_by_attributes(self._service, id=self._module.params['id'])
    elif (search_params is not None):
        entity = search_by_attributes(self._service, **search_params)
    elif (('name' in self._module.params) and (self._module.params['name'] is not None)):
        entity = search_by_attributes(self._service, name=self._module.params['name'])
    return entity
