<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

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.value}