def METHOD_NAME(
        cmd, client, resource_group_name, cross_connection_name, peering_type, peer_asn, vlan_id,
        primary_peer_address_prefix, secondary_peer_address_prefix, shared_key=None,
        advertised_public_prefixes=None, customer_asn=None, routing_registry_name=None):
    (ExpressRouteCrossConnectionPeering, ExpressRouteCircuitPeeringConfig, ExpressRoutePeeringType) = \
        cmd.get_models('ExpressRouteCrossConnectionPeering', 'ExpressRouteCircuitPeeringConfig',
                       'ExpressRoutePeeringType')
    peering = ExpressRouteCrossConnectionPeering(
        peering_type=peering_type, peer_asn=peer_asn, vlan_id=vlan_id,
        primary_peer_address_prefix=primary_peer_address_prefix,
        secondary_peer_address_prefix=secondary_peer_address_prefix,
        shared_key=shared_key)
    if peering_type == ExpressRoutePeeringType.microsoft_peering.value:
        peering.microsoft_peering_config = ExpressRouteCircuitPeeringConfig(
            advertised_public_prefixes=advertised_public_prefixes,
            customer_asn=customer_asn,
            routing_registry_name=routing_registry_name)
    return client.create_or_update(resource_group_name, cross_connection_name, peering_type, peering)