def format_gross_range(param, sensor_range, user_range, site, node, sensor, stream, source):
    """
    Creates a dictionary object that can later be saved to a CSV formatted
    file for use in the Gross Range lookup tables.

    :param param: parameter name of the variable for the calculated user range
    :param sensor_range: default sensor, or fail range, usually referenced
        from the vendor documentation
    :param user_range: user range, or sensor range, calculated from the data
    :param site: Site designator, extracted from the first part of the reference
        designator
    :param node: Node designator, extracted from the second part of the reference
        designator
    :param sensor: Sensor designator, extracted from the third and fourth part of
        the reference designator
    :param stream: Stream name that contains the data of interest
    :param source: Notes or comments about how the Gross Range values were
        obtained
    :return qc_dict: dictionary with the sensor and user gross range values
        added in the formatting expected by the QC lookup tables
    """
    # create the dictionary
    qc_dict = {
        'subsite': site,
        'node': node,
        'sensor': sensor,
        'stream': stream,
        'parameter': {
            'inp': param
        },
        'qcConfig': {
             'qartod': {
                 'gross_range_test': {
                     'suspect_span': ['{}'.format(user_range[0]), '{}'.format(user_range[1])],
                     'fail_span': ['{}'.format(sensor_range[0]), '{}'.format(sensor_range[1])]
                 }
             }
         },
        'source': source
    }
    return qc_dict