@hepnames.over('<STR_LIT>', '<STR_LIT>')<EOL>def arxiv_categories(self, key, value):
def _is_arxiv(category):<EOL><INDENT>return category in valid_arxiv_categories()<EOL><DEDENT>def _is_inspire(category):<EOL><INDENT>schema = load_schema('<STR_LIT>')<EOL>valid_inspire_categories = schema['<STR_LIT>']['<STR_LIT>']['<STR_LIT>']<EOL>return category in valid_inspire_categories<EOL><DEDENT>def _normalize(a_value):<EOL><INDENT>for category in valid_arxiv_categories():<EOL><INDENT>if a_value.lower() == category.lower():<EOL><INDENT>return normalize_arxiv_category(category)<EOL><DEDENT><DEDENT>schema = load_schema('<STR_LIT>')<EOL>valid_inspire_categories = schema['<STR_LIT>']['<STR_LIT>']['<STR_LIT>']<EOL>for category in valid_inspire_categories:<EOL><INDENT>if a_value.lower() == category.lower():<EOL><INDENT>return category<EOL><DEDENT><DEDENT>field_codes_to_inspire_categories = {<EOL>'<STR_LIT:a>': '<STR_LIT>',<EOL>'<STR_LIT:b>': '<STR_LIT>',<EOL>'<STR_LIT:c>': '<STR_LIT>',<EOL>'<STR_LIT:e>': '<STR_LIT>',<EOL>'<STR_LIT:g>': '<STR_LIT>',<EOL>'<STR_LIT:i>': '<STR_LIT>',<EOL>'<STR_LIT:l>': '<STR_LIT>',<EOL>'<STR_LIT:m>': '<STR_LIT>',<EOL>'<STR_LIT:n>': '<STR_LIT>',<EOL>'<STR_LIT:o>': '<STR_LIT>',<EOL>'<STR_LIT:p>': '<STR_LIT>',<EOL>'<STR_LIT:q>': '<STR_LIT>',<EOL>'<STR_LIT:t>': '<STR_LIT>',<EOL>'<STR_LIT:x>': '<STR_LIT>',<EOL>}<EOL>return field_codes_to_inspire_categories.get(a_value.lower())<EOL><DEDENT>arxiv_categories = self.get('<STR_LIT>', [])<EOL>inspire_categories = self.get('<STR_LIT>', [])<EOL>for value in force_list(value):<EOL><INDENT>for a_value in force_list(value.get('<STR_LIT:a>')):<EOL><INDENT>normalized_a_value = _normalize(a_value)<EOL>if _is_arxiv(normalized_a_value):<EOL><INDENT>arxiv_categories.append(normalized_a_value)<EOL><DEDENT>elif _is_inspire(normalized_a_value):<EOL><INDENT>inspire_categories.append({'<STR_LIT>': normalized_a_value})<EOL><DEDENT><DEDENT><DEDENT>self['<STR_LIT>'] = inspire_categories<EOL>return arxiv_categories<EOL>
Populate the ``arxiv_categories`` key.

    Also populates the ``inspire_categories`` key through side effects.