def get_examples(self, compact=False):
<EOL>examples = copy.deepcopy(self._examples)<EOL>if not compact:<EOL><INDENT>return examples<EOL><DEDENT>def make_compact(d):<EOL><INDENT>if not isinstance(d, dict):<EOL><INDENT>return<EOL><DEDENT>for key in d:<EOL><INDENT>if isinstance(d[key], dict):<EOL><INDENT>inner_d = d[key]<EOL>if len(inner_d) == <NUM_LIT:1> and '<STR_LIT>' in inner_d:<EOL><INDENT>d[key] = inner_d['<STR_LIT>']<EOL><DEDENT>else:<EOL><INDENT>make_compact(inner_d)<EOL><DEDENT><DEDENT>if isinstance(d[key], list):<EOL><INDENT>for item in d[key]:<EOL><INDENT>make_compact(item)<EOL><DEDENT><DEDENT><DEDENT><DEDENT>for example in examples.values():<EOL><INDENT>if (isinstance(example.value, dict) and<EOL>len(example.value) == <NUM_LIT:1> and '<STR_LIT>' in example.value):<EOL><INDENT>example.value = example.value['<STR_LIT>']<EOL><DEDENT>else:<EOL><INDENT>make_compact(example.value)<EOL><DEDENT><DEDENT>return examples<EOL>
Returns an OrderedDict mapping labels to Example objects.

Args:
    compact (bool): If True, union members of void type are converted
        to their compact representation: no ".tag" key or containing
        dict, just the tag as a string.