code: def _get_dvportgroup_out_shaping(pg_name, pg_default_port_config):
      '''
      Returns the out shaping 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\' out shaping config', pg_name)
      out_shaping_policy = pg_default_port_config.outShapingPolicy
      if not out_shaping_policy:
          return {}
      return {'average_bandwidth': out_shaping_policy.averageBandwidth.value,
              'burst_size': out_shaping_policy.burstSize.value,
              'enabled': out_shaping_policy.enabled.value,
              'peak_bandwidth': out_shaping_policy.peakBandwidth.valuef _get_dvportgroup_out_shaping(pg_name, pg_default_port_config):
      '''
      Returns the out shaping 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\' out shaping config', pg_name)
      out_shaping_policy = pg_default_port_config.outShapingPolicy
      if not out_shaping_policy:
          return {}
      return {'average_bandwidth': out_shaping_policy.averageBandwidth.value,
              'burst_size': out_shaping_policy.burstSize.value,
              'enabled': out_shaping_policy.enabled.value,
              'peak_bandwidth': out_shaping_policy.peakBandwidth.value}
docs: Returns the out shaping policy of a distributed virtual portgroup
  
      pg_name
          The name of the portgroup
  
      pg_default_port_config
          The dafault port config of the portgroup