def METHOD_NAME(value):
    if value == 'nearest':
        return 'nearest'
    if value == 'nan':
        return np.nan
    try:
        return float(value)
    except:
        raise argparse.ArgumentTypeError(
            "invalid argument: {0} please use get_fields_at_coordinates --help for more "
            "information".format(value))