code: def create_network(self, net_view_name, cidr, nameservers=None,
                         members=None, gateway_ip=None, dhcp_trel_ip=None,
                         network_extattrs=None):
          ipv4 = ib_utils.determine_ip_version(cidr) == 4
          options = []
          if nameservers:
              options.append(obj.DhcpOption(name='domain-name-servers',
                                            value=",".join(nameservers)))
          if ipv4 and gateway_ip:
              options.append(obj.DhcpOption(name='routers',
                                            value=gateway_ip))
          if ipv4 and dhcp_trel_ip:
              options.append(obj.DhcpOption(name='dhcp-server-identifier',
                                            num=54,
                                            value=dhcp_trel_ip))
          return obj.Network.create(self.connector,
                                    network_view=net_view_name,
                                    cidr=cidr,
                                    members=members,
                                    options=options,
                                    extattrs=network_extattrs,
                                    check_if_exists=False)