def is_on(current_source):
    """Query the current source as on or off.

    args:
        current_source (pyvisa.resources.gpib.GPIBInstrument): Keithley 6221

    returns:
        (bool): True (on) or False (off)
    """
    result = current_source.query("output?")
    if float(result.replace("\n", "")) == 1:
        return True
    else:
        return False