code: def cmd_output_remove(self, args):
          '''remove an output'''
          device = args[0]
          for i in range(len(self.mpstate.mav_outputs)):
              conn = self.mpstate.mav_outputs[i]
              if str(i) == device or conn.address == device:
                  print("Removing output %s" % conn.address)
                  try:
                      mp_util.child_fd_list_add(conn.port.fileno())
                  except Exception:
                      pass
                  conn.close()
                  self.mpstate.mav_outputs.pop(i)
                  returf cmd_output_remove(self, args):
          '''remove an output'''
          device = args[0]
          for i in range(len(self.mpstate.mav_outputs)):
              conn = self.mpstate.mav_outputs[i]
              if str(i) == device or conn.address == device:
                  print("Removing output %s" % conn.address)
                  try:
                      mp_util.child_fd_list_add(conn.port.fileno())
                  except Exception:
                      pass
                  conn.close()
                  self.mpstate.mav_outputs.pop(i)
                  return
docs: remove an output