docs: def dv_port_group_create_task(dv_port_name, dv_switch, spec, vlan_id, logger, promiscuous_mode, num_ports=32):
          """
          Create ' Distributed Virtual Portgroup' Task
          :param dv_port_name: <str>  Distributed Virtual Portgroup Name
          :param dv_switch: <vim.dvs.VmwareDistributedVirtualSwitch> Switch this Portgroup will be belong to
          :param spec:
          :param vlan_id: <int>
          :param logger:
          :param num_ports: <int> number of ports in this Group
          :param promiscuous_mode <str> 'True' or 'False' turn on/off promiscuous mode for the port group
          :return: <vim.Task> Task which really provides update
          """
  
          dv_pg_spec = vim.dvs.DistributedVirtualPortgroup.ConfigSpec()
          dv_pg_spec.name = dv_port_name
          dv_pg_spec.numPorts = num_ports
          dv_pg_spec.type = vim.dvs.DistributedVirtualPortgroup.PortgroupType.earlyBinding
  
          dv_pg_spec.defaultPortConfig = vim.dvs.VmwareDistributedVirtualSwitch.VmwarePortConfigPolicy()
          dv_pg_spec.defaultPortConfig.securityPolicy = vim.dvs.VmwareDistributedVirtualSwitch.SecurityPolicy()
  
          dv_pg_spec.defaultPortConfig.vlan = spec
          dv_pg_spec.defaultPortConfig.vlan.vlanId = vlan_id
  
          promiscuous_mode = promiscuous_mode.lower() == 'true'
          dv_pg_spec.defaultPortConfig.securityPolicy.allowPromiscuous = vim.BoolPolicy(value=promiscuous_mode)
          dv_pg_spec.defaultPortConfig.securityPolicy.forgedTransmits = vim.BoolPolicy(value=True)
  
          dv_pg_spec.defaultPortConfig.vlan.inherited = False
          dv_pg_spec.defaultPortConfig.securityPolicy.macChanges = vim.BoolPolicy(value=False)
          dv_pg_spec.defaultPortConfig.securityPolicy.inherited = False
  
          task = dv_switch.AddDVPortgroup_Task([dv_pg_spec])
  
          logger.info(u"DV Port Group '{}' CREATE Task ...".format(dv_port_name))
          return task