def METHOD_NAME(ncfile):
    """ get_ncdims(ncfile)
    - function to return dictionary of netCDF file dimensions and their lengths
    input: ncfile - string to path to netCDF file
    output: ncdims - dictionary where key is the name of a dimension and the
                        value is the length of that dimension
                        ex:  ncdims['pfull'] = 127
    """
    try:
        import netCDF4 as nc
    except ImportError as err:
        raise ImportError(f"Unable to import netCDF4 module\n{err}")
    ncf = nc.Dataset(ncfile)
    ncdims = {}
    for d in ncf.dimensions.keys():
        ncdims[d] = int(len(ncf.dimensions[d]))
    ncf.close()
    return ncdims