code: def network_stats(self):
          
          statistics = {}
          mstp_networks = []
          mstp_map = {}
          ip_devices = []
          bacoids = []
          mstp_devices = []
          for address, bacoid in self.whois_answer[0].keys():
              if ":" in address:
                  net, mac = address.split(":")
                  mstp_networks.append(net)
                  mstp_devices.append(mac)
                  try:
                      mstp_map[net].append(mac)
                  except KeyError:
                      mstp_map[net] = []
                      mstp_map[net].append(mac)
              else:
                  net = "ip"
                  mac = address
                  ip_devices.append(address)
              bacoids.append((bacoid, address))
          mstpnetworks = sorted(set(mstp_networks))
          statistics["mstp_networks"] = mstpnetworks
          statistics["ip_devices"] = sorted(ip_devices)
          statistics["bacoids"] = sorted(bacoids)
          statistics["mstp_map"] = mstp_map
          statistics["timestamp"] = str(datetime.now())
          statistics["number_of_devices"] = self.number_of_devices
          statistics["number_of_registered_devices"] = len(self.registered_devices)
          statistics["print_mstpnetworks"] = self.print_list(mstpnetworks)
          return statistics
docs: Used by Flask to show informations on the network