def is_batch(code, shape, axes):
    """Method to check if given axis code belongs to a batch dimension.

    Parameters
    ----------
    code : str
    shape : tuple
    axes : str

    Returns
    -------
    bool

    """
    # special case:
    if len(shape) == 3 and 'X' in axes and 'Y' in axes and 'I' == code:
        return False

    return code not in 'XYZTQC'