code: def allow_ip(*ips: typing.Union[str, ipaddress.IPv4Network, ipaddress.IPv4Address]):
      
      for ip in ips:
          if isinstance(ip, ipaddress.IPv4Address):
              allowed_ips.add(ip)
          elif isinstance(ip, str):
              allowed_ips.add(ipaddress.IPv4Address(ip))
          elif isinstance(ip, ipaddress.IPv4Network):
              allowed_ips.update(ip.hosts())
          else:
              raise ValueError(f"Bad type of ipaddress: {type(ip)} ('{ip}')")
docs: Allow ip address.
  
      :param ips:
      :return: