def get_unique_sample_files(file_samples):
assert isinstance(file_samples, pd.DataFrame)<EOL>df = file_samples  <EOL>df = df.sort_values('<STR_LIT>')<EOL>logger.info('<STR_LIT>', len(df.index))<EOL>df.drop_duplicates('<STR_LIT>', keep='<STR_LIT>', inplace=True)<EOL>logger.info('<STR_LIT>'<EOL>'<STR_LIT>', len(df.index))<EOL>df['<STR_LIT>'] = df['<STR_LIT>'].apply(lambda x: x[:<NUM_LIT:15>])<EOL>df.drop_duplicates('<STR_LIT>', keep='<STR_LIT>', inplace=True)<EOL>logger.info('<STR_LIT>'<EOL>'<STR_LIT>', len(df.index))<EOL>df.drop('<STR_LIT>', axis=<NUM_LIT:1>, inplace=True)<EOL>df.sort_index(inplace=True)<EOL>return df<EOL>
Filter file_sample data frame to only keep one file per sample.

    Params
    ------
    file_samples : `pandas.DataFrame`
        A data frame containing a mapping between file IDs and sample barcodes.
        This type of data frame is returned by :meth:`get_file_samples`.

    Returns
    -------
    `pandas.DataFrame`
        The filtered data frame.

    Notes
    -----
    In order to remove redundant files in a consistent fashion, the samples are
    sorted by file ID, and then the first file for each sample is kept.