def _example(media_type_objects, method=None, endpoint=None, status=None,<EOL>nb_indent=<NUM_LIT:0>):
indent = '<STR_LIT:U+0020>'<EOL>extra_indent = indent * nb_indent<EOL>if method is not None:<EOL><INDENT>method = method.upper()<EOL><DEDENT>else:<EOL><INDENT>try:<EOL><INDENT>status_text = http_status_codes[int(status)]<EOL><DEDENT>except (ValueError, KeyError):<EOL><INDENT>status_text = '<STR_LIT:->'<EOL><DEDENT><DEDENT>for content_type, content in media_type_objects.items():<EOL><INDENT>examples = content.get('<STR_LIT>')<EOL>example = content.get('<STR_LIT>')<EOL>if examples is None:<EOL><INDENT>examples = {}<EOL>if not example:<EOL><INDENT>if content_type != '<STR_LIT:application/json>':<EOL><INDENT>LOG.info('<STR_LIT>')<EOL>continue<EOL><DEDENT>example = _parse_schema(content['<STR_LIT>'], method=method)<EOL><DEDENT>if method is None:<EOL><INDENT>examples['<STR_LIT>'] = {<EOL>'<STR_LIT:value>': example,<EOL>}<EOL><DEDENT>else:<EOL><INDENT>examples['<STR_LIT>'] = {<EOL>'<STR_LIT:value>': example,<EOL>}<EOL><DEDENT><DEDENT>for example in examples.values():<EOL><INDENT>if not isinstance(example['<STR_LIT:value>'], six.string_types):<EOL><INDENT>example['<STR_LIT:value>'] = json.dumps(<EOL>example['<STR_LIT:value>'], indent=<NUM_LIT:4>, separators=('<STR_LIT:U+002C>', '<STR_LIT>'))<EOL><DEDENT><DEDENT>for example_name, example in examples.items():<EOL><INDENT>if '<STR_LIT>' in example:<EOL><INDENT>example_title = '<STR_LIT>'.format(<EOL>**locals())<EOL><DEDENT>else:<EOL><INDENT>example_title = example_name<EOL><DEDENT>yield '<STR_LIT>'<EOL>yield '<STR_LIT>'.format(**locals())<EOL>yield '<STR_LIT>'<EOL>yield '<STR_LIT>'.format(**locals())<EOL>yield '<STR_LIT>'<EOL>if method:<EOL><INDENT>yield '<STR_LIT>'.format(**locals())<EOL>yield '<STR_LIT>'.format(**locals())<EOL>yield '<STR_LIT>'.format(**locals())<EOL><DEDENT>else:<EOL><INDENT>yield '<STR_LIT>'.format(**locals())<EOL>yield '<STR_LIT>'.format(**locals())<EOL><DEDENT>yield '<STR_LIT>'<EOL>for example_line in example['<STR_LIT:value>'].splitlines():<EOL><INDENT>yield '<STR_LIT>'.format(**locals())<EOL><DEDENT>yield '<STR_LIT>'<EOL><DEDENT><DEDENT>
Format examples in `Media Type Object` openapi v3 to HTTP request or
HTTP response example.
If method and endpoint is provided, this fonction prints a request example
else status should be provided to print a response example.

Arguments:
    media_type_objects (Dict[str, Dict]): Dict containing
        Media Type Objects.
    method: The HTTP method to use in example.
    endpoint: The HTTP route to use in example.
    status: The HTTP status to use in example.