def cmdOutput(output):
            """
            Callback function for handling command output.
            """
            cmds = []
            for cmd in output:
                if _PY3 and isinstance(cmd, bytes):
                    cmd = cmd.decode("utf-8")
                cmds.append(cmd)
            return cmds[:3] + cmds[4:]

            Callback function for handling command output.
            
stackoverflow/venv/lib/python3.6/site-packages/twisted/conch/test/test_cftp.py