def _FilterSubstructureMatchByAtomMapNumbers(Mol, PatternMol, AtomIndices, AtomMapIndices):
    """Filter substructure match atom indices by atom map indices corresponding to
    atom map numbers.
    """
    
    if AtomMapIndices is None:
        return list(AtomIndices)
                                               
    return [AtomIndices[Index] for Index in AtomMapIndices]