def check_dimensionality(q, dim):
return (q._REGISTRY.get_dimensionality(dim) == q.dimensionality)<EOL>
Return whether the quantity has the dimensionality given.

    Parameters
    ----------
    q : pint._Quantity
    dim : pint.util.UnitsContainer

    Returns
    -------
    value : bool