import csv


def unpack_csv_data(csv_object):
    """
    Accepts a fle object and returns a csv.DictReader object for parsing.
    The CSV file syntax is autodetected before parsing.
    This function can be used for any CSV files for parsing.

    :param csv_object: The opened file object
    :return: csv.DictReader of the file
    """
    # Reads 2 MB of the file to detect the CSV dialect
    dialect = csv.Sniffer().sniff(csv_object.read(2097152))
    # Rewinds the file back to the start position
    csv_object.seek(0)
    csv_data = csv.DictReader(csv_object, dialect=dialect)
    return csv_data