code: def term2hex(code: Numeric, default: Optional[str] = None) -> str:
      
      try:
          val = term2hex_map.get('{:02}'.format(int(code), default))
      except ValueError:
          raise ValueError(
              'Expecting an int or number string, got: {} ({})'.format(
                  code,
                  getattr(code, '__name__', type(code).__name__)))
      return val
docs: Convenience function for term2hex_map.get(code, None).
          Accepts strs or ints in the form of: 1, 01, 123.
          Returns `default` if the code is not found.