def gabfr_nbrs(gabfr):
    """
    gabfr_nbrs(gabfr)

    Returns the numbers corresponding to the Gabor frame letters 
    (A, B, C, D/U, G).

    Required args:
        - gabfr (str or list): gabor frame letter(s)

    Returns:
        - gab_nbr (int or list): gabor frame number(s)
    """

    if not isinstance(gabfr, list):
        gabfr_list = False
        gabfr = [gabfr]
    else:
        gabfr_list = True

    all_gabfr  = ["A", "B", "C", "D", "U", "D/U", "G"]
    all_gabnbr = [0, 1, 2, 3, 3, 3, 4]

    gabfr = [
        all_gabfr[all_gabnbr.index(fr)] 
        if fr in all_gabnbr else fr 
        for fr in gabfr
        ]

    if sum([g not in all_gabfr for g in gabfr]):
        raise ValueError("Gabor frames letters include A, B, C, D, U and G only.")
    
    
    if gabfr_list:
        gab_nbr = [all_gabnbr[all_gabfr.index(g)] for g in gabfr]
    
    else:
        gab_nbr = all_gabnbr[all_gabfr.index(gabfr[0])]
    
    return gab_nbr