docs: def convert(origin, target, type):
      """
      convert type from origin to target
      origin/target must be ROOTCODE, ROOTNAME, ARRAY, or NUMPY
      """
      _origin = origin.upper()
      if _origin == 'ROOTCODE':
          _origin = root_type_codes
      elif _origin == 'ROOTNAME':
          _origin = root_type_names
      elif _origin == 'ARRAY':
          _origin = python_codes
      elif _origin == 'NUMPY':
          _origin = numpy_codes
      else:
          raise ValueError("{0} is not a valid type".format(origin))
  
      _target = target.upper()
      if _target == 'ROOTCODE':
          _target = root_type_codes
      elif _target == 'ROOTNAME':
          _target = root_type_names
      elif _target == 'ARRAY':
          _target = python_codes
      elif _target == 'NUMPY':
          _target = numpy_codes
      else:
          raise ValueError("{0} is not a valid type".format(target))
  
      if type not in _origin:
          raise ValueError("{0} is not a valid {1} type".format(type, origin))
  
      return _target[_origin.index(type)]