def METHOD_NAME(anat_file):
    """Infer the number of slices in x axis from an image.
    NOTE: This is a Node function.
    Parameters
    ----------
    anat_file
    Returns
    -------
    frame_numbers
    """
    import nibabel as nb
    import numpy as np
    img = nb.load(anat_file)
    # Get number of slices in x axis.
    n_slices = img.shape[0]
    frame_numbers = np.arange(1, n_slices + 1, dtype=int)
    ijk = np.ones((2, 3), dtype=int)
    ijk[:, 0] = [0, n_slices]
    xyz = nb.affines.apply_affine(img.affine, ijk)
    first_slice, last_slice = sorted(xyz[:, 0].astype(int))
    frame_numbers = list(np.arange(first_slice, last_slice + 1, dtype=int))
    return frame_numbers