code: def _get_dvportgroup_security_policy(pg_name, pg_default_port_config):
      '''
      Returns the security policy of a distributed virtual portgroup
  
      pg_name
          The name of the portgroup
  
      pg_default_port_config
          The dafault port config of the portgroup
      '''
      log.trace('Retrieving portgroup\'s \'%s\' security policy config', pg_name)
      sec_policy = pg_default_port_config.securityPolicy
      if not sec_policy:
          return {}
      return {'allow_promiscuous': sec_policy.allowPromiscuous.value,
              'forged_transmits': sec_policy.forgedTransmits.value,
              'mac_changes': sec_policy.macChanges.valuef _get_dvportgroup_security_policy(pg_name, pg_default_port_config):
      '''
      Returns the security policy of a distributed virtual portgroup
  
      pg_name
          The name of the portgroup
  
      pg_default_port_config
          The dafault port config of the portgroup
      '''
      log.trace('Retrieving portgroup\'s \'%s\' security policy config', pg_name)
      sec_policy = pg_default_port_config.securityPolicy
      if not sec_policy:
          return {}
      return {'allow_promiscuous': sec_policy.allowPromiscuous.value,
              'forged_transmits': sec_policy.forgedTransmits.value,
              'mac_changes': sec_policy.macChanges.value}
docs: Returns the security policy of a distributed virtual portgroup
  
      pg_name
          The name of the portgroup
  
      pg_default_port_config
          The dafault port config of the portgroup