def get_metadata_statement(self, input, cls=MetadataStatement,<EOL>context='<STR_LIT>'):
logger.debug('<STR_LIT>'.format(input))<EOL>if isinstance(input, dict):<EOL><INDENT>data = input<EOL><DEDENT>else:<EOL><INDENT>if isinstance(input, Message):<EOL><INDENT>data = input.to_dict()<EOL><DEDENT>else:<EOL><INDENT>data = json.loads(input)<EOL><DEDENT><DEDENT>_pi = self.unpack_metadata_statement(ms_dict=data, cls=cls)<EOL>if not _pi.result:<EOL><INDENT>return []<EOL><DEDENT>logger.debug('<STR_LIT>')<EOL>if context:<EOL><INDENT>_cms = self.correct_usage(_pi.result, context)<EOL><DEDENT>else:<EOL><INDENT>_cms = _pi.result<EOL><DEDENT>logger.debug('<STR_LIT>'.format(_cms))<EOL>if _cms:<EOL><INDENT>return self.evaluate_metadata_statement(_cms)<EOL><DEDENT>else:<EOL><INDENT>return []<EOL><DEDENT>
Unpack and evaluate a compound metadata statement. Goes through the
necessary three steps.
* unpack the metadata statement
* verify that the given statements are expected to be used in this context
* evaluate the metadata statements (= flatten)

:param input: The metadata statement as a JSON document or a
    dictionary
:param cls: The class the response should be typed into
:param context: In which context the metadata statement should be used.
:return: A list of :py:class:`fedoidc.operator.LessOrEqual` instances