def METHOD_NAME(port, terse):
    """Return a command line for lsof for processes with specified TCP state."""
    terse_arg = ""
    if terse:
        terse_arg = "-t"
    return "lsof -b -P -n %s -i udp:%u -a" % (terse_arg, port)