from typing import List


def get_neighbor_distribution_list(Neighbors: List, indices_ab, Spec_ba) -> List:
    """
    get neighbor distribution of elemnet B/A with respect to element A/B
    Parameters
    ----------
    Neighbors_ab : List
        list of neighbor atoms for element A/B
    Spec_ba : Element
        element B/A
    Returns : List
        list of the of neighbor distribution
    """

    neighbors = [Neighbors[i] for i in indices_ab]
    NeighborDistList = []
    for aN in neighbors:
        tempNeighborList = [
            neighbor for neighbor in aN if neighbor[0].specie == Spec_ba
        ]  # Neighbors of alphaSpec that are betaSpec
        NeighborDist = [j[1][1] for j in enumerate(tempNeighborList)]
        NeighborDistList.append(
            NeighborDist
        )  # Add the neighbor distances of all such neighbors to a list
    return NeighborDistList