def METHOD_NAME(row, dg):
    """
    map cycle numbers to physics runs, and identify detector
    """
    myrow = row.copy() # i have no idea why mjcenpa makes me do this
    cyc = myrow['cycle']
    for run, cycles in dg.runDB.items():
        tmp = cycles[0].split(',')
        for rng in tmp:
            if '-' in rng:
                clo, chi = [int(x) for x in rng.split('-')]
                if clo <= cyc <= chi:
                    myrow['run'] = run
                    break
            else:
                clo = int(rng)
                if cyc == clo:
                    myrow['run'] = run
                    break
    # label the detector
    if 0 < cyc <= 2018:
        myrow['runtype'] = 'mj60'
    elif 2019 <= cyc <= 2360:
        myrow['runtype'] = 'oppi'
    return myrow