code: def is_arxiv(obj):
      
      arxiv_test = obj.split()
      if not arxiv_test:
          return False
  
      matched_arxiv = (RE_ARXIV_PRE_2007_CLASS.match(arxiv_test[0]) or
                       RE_ARXIV_POST_2007_CLASS.match(arxiv_test[0]))
  
      if not matched_arxiv:
          return False
  
      if not matched_arxiv.group('category'):
          return True
  
      valid_arxiv_categories_lower = [category.lower() for category in valid_arxiv_categories()]
      category = matched_arxiv.group('category').lower()
      return (category in valid_arxiv_categories_lower or
              category.replace('-', '.') in valid_arxiv_categories_lower)
docs: Return ``True`` if ``obj`` contains an arXiv identifier.
  
      The ``idutils`` library's ``is_arxiv`` function has been
      modified here to work with two regular expressions instead
      of three and adding a check for valid arxiv categories only