def initialize_context(self, request: HttpRequest, *args, **kwargs) -> None:
for key in self.CONTEXT_KEYS:<EOL><INDENT>setattr(self, key, kwargs.get(key))<EOL><DEDENT>for key in self.QUERY_CONTEXT_KEYS:<EOL><INDENT>setattr(self, key, request.query_params.get(key))<EOL><DEDENT>self._initialize_context()<EOL>self.validate_context()<EOL>
Initializes the endpoint with the context keys based on the passed
and/or based on the query parameters (request.GET).