def _can_for_object(self, func_name, object_id, method_name):
can_for_session = self._can(func_name)<EOL>if (can_for_session or<EOL>self._object_catalog_session is None or<EOL>self._override_lookup_session is None):<EOL><INDENT>return can_for_session<EOL><DEDENT>override_auths = self._override_lookup_session.get_authorizations_for_agent_and_function(<EOL>self.get_effective_agent_id(),<EOL>self._get_function_id(func_name))<EOL>if not override_auths.available():<EOL><INDENT>return False<EOL><DEDENT>if self._object_catalog_session is not None:<EOL><INDENT>catalog_ids = list(getattr(self._object_catalog_session, method_name)(object_id))<EOL>for auth in override_auths:<EOL><INDENT>if auth.get_qualifier_id() in catalog_ids:<EOL><INDENT>return True<EOL><DEDENT><DEDENT><DEDENT>return False<EOL>
Checks if agent can perform function for object