code: def find_link(self, device):
          '''find a device based on number, name or label'''
          for i in range(len(self.mpstate.mav_master)):
              conn = self.mpstate.mav_master[i]
              if (str(i) == device or
                  conn.address == device or
                  getattr(conn, 'label', None) == device):
                  return i
          return Nonf find_link(self, device):
          '''find a device based on number, name or label'''
          for i in range(len(self.mpstate.mav_master)):
              conn = self.mpstate.mav_master[i]
              if (str(i) == device or
                  conn.address == device or
                  getattr(conn, 'label', None) == device):
                  return i
          return None
docs: find a device based on number, name or label