def METHOD_NAME(
    meta: ChunkedGraphMeta,
    edges: Edges,
    sv_parent_d: Dict,
) -> Tuple[Edges, Edges, Edges]:
    """Faster version of categorize_edges(), avoids looping over L2 IDs."""
    node_ids1 = fastremap.remap(
        edges.node_ids1, sv_parent_d, preserve_missing_labels=True
    )
    node_ids2 = fastremap.remap(
        edges.node_ids2, sv_parent_d, preserve_missing_labels=True
    )
    layer_mask1 = chunk_utils.get_chunk_layers(meta, node_ids1) > 1
    nodes_mask = node_ids1 == node_ids2
    in_edges = edges[nodes_mask]
    all_out_ = edges[layer_mask1 & ~nodes_mask]
    cx_layers = get_cross_chunk_edges_layer(meta, all_out_.get_pairs())
    cx_mask = cx_layers > 1
    out_edges = all_out_[~cx_mask]
    cross_edges = all_out_[cx_mask]
    return (in_edges, out_edges, cross_edges)