def get_run_info_miseq( instrument_model, application_version, tree ):
    """
    Helper function to get some info about the sequencing runs.
    Args:
        tree: xml tree 
    Returns:
        dict: basic statistics about run, like date, instrument, number of lanes, flowcell ID, read lengths, etc.
    """
    run_stats = {}

    setup_node = tree.getroot().find("Setup")
    if setup_node is None:
        setup_node = tree.getroot()

    # Get required tree nodes.
    flowcell_node = tree.getroot().find("FlowcellRFIDTag")
    reads_node = tree.getroot().find('Reads')

    # Now actually populate various stats
    run_stats['flow_cell_id'] = flowcell_node.find('SerialNumber').text
    run_stats['date'] = tree.getroot().find('RunStartDate').text
    run_stats['instrument'] = tree.getroot().find('ScannerID').text
    run_stats['lanes'] = int(setup_node.find('NumLanes').text)
    run_stats['run_id'] = tree.getroot().find('RunID').text    

    read_len = []
    index_len = []
    for read_info in reads_node.findall('RunInfoRead'):
        attrib = read_info.attrib
        if( attrib['IsIndexedRead'] == 'Y' ):
          index_len.append( int( attrib['NumCycles'] ) )
        else:
          read_len.append( int( attrib['NumCycles'] ) )

    run_stats['r1_length'] = read_len[0]
    run_stats['p7_index_length'] = index_len[0]

    run_stats['paired_end'] = False
    if( len( read_len ) == 2 ):
      run_stats['r1_length'] = read_len[1]
      run_stats['p5_index_length'] = index_len[1]
      run_stats['paired_end'] = True

    run_stats['instrument_type'] = instrument_model
    run_stats['reverse_complement_i5'] = False

    return run_stats