def METHOD_NAME(api_type, config):
    '''Returns the numpy type to use in the Python API from the original visa or custom type used in the C API
    Do not use this with enums.
    '''
    if api_type in _type_map and _type_map[api_type]['numpy_type'] is not None:
        return _type_map[api_type]['numpy_type']
    else:
        for c in config['custom_types']:
            if c['ctypes_type'] == api_type:
                return c['python_name']
        # We didn't find it so assert
        assert False, 'Unknown value for api_type: {0}'.format(api_type)