def filename_or_id(string):
    """
    Determine based on suffix is something is a file or an ide.
    """
    for ending in ['.gz', '.bz2', '.json', '.parquet']:
        if string.endswith(ending):
            return 'filename'
    if '.' in string[:6]:
        return 'id'
    raise NameError(
        "Can't determine if {} is supposed to be a filename or an id.".
        format(string) +
        "Please explicitly name your first argument to Volume 'id' or 'path'.")
