def METHOD_NAME(inp, d_in=True, wait_mode=None, timeout=None):
    # Set up M66 command
    cmd = 'M66 %(ad_in)s%(wait_mode)s%(timeout)s' % dict(
        # for sanity, specify input 1, changed to 0 in remap
        ad_in = ('P1' if d_in else 'E1'),
        wait_mode = (' L%d' % wait_mode if wait_mode is not None else ''),
        timeout = (' Q%d' % timeout if timeout is not None else ''),
        )
    # Set input pin
    if d_in:
        h['d_in'] = inp
    else:
        h['a_in'] = inp
    # Print pre-test values
    s.poll() # Update status channel
    c.mdi('(print,cmd: "%s"; input: %.4f)' % (cmd, inp))
    c.mdi('(print,    M66 remapping pre:  5399=#5399; 100=#100; '
          'ain0=%.2f; din0=%d)' % (s.ain[0], s.din[0]))
    # Run test command and wait for it
    c.mdi(cmd)
    c.wait_complete()
    # Print post-test values
    s.poll() # Update status channel
    c.mdi('(print,    M66 remapping post:  5399=#5399; 100=#100; '
          'ain0=%.2f; din0=%d)' % (s.ain[0], s.din[0]))