code: def _ip_setter(self, ipaddr_name, ipaddrs_name, ips):
          
          if isinstance(ips, six.string_types):
              setattr(self, ipaddr_name, ips)
          elif isinstance(ips, (list, tuple)) and isinstance(ips[0], IP):
              setattr(self, ipaddr_name, ips[0].ip)
              setattr(self, ipaddrs_name, ips)
          elif isinstance(ips, IP):
              setattr(self, ipaddr_name, ips.ip)
              setattr(self, ipaddrs_name, [ips])
          elif ips is None:
              setattr(self, ipaddr_name, None)
              setattr(self, ipaddrs_name, None)
          else:
              raise ValueError(
                  "Invalid format of ip passed in: %s."
                  "Should be string or list of NIOS IP objects." % ips)
docs: Setter for ip fields
  
          Accept as input string or list of IP instances.
          String case:
              only ipvXaddr is going to be filled, that is enough to perform
              host record search using ip
          List of IP instances case:
              ipvXaddrs is going to be filled with ips content,
              so create can be issues, since fully prepared IP objects in place.
              ipXaddr is also filled to be able perform search on NIOS
              and verify that no such host record exists yet.