def METHOD_NAME(cls, charge):
    """Check to see that a charge is a unyt array of the right dimension."""
    if not isinstance(charge, u.unyt_array):
        warnings.warn(
            UNIT_WARNING_STRING.format("Charges", "elementary charge")
        )
        charge *= u.elementary_charge
    else:
        ensure_valid_dimensions(charge, u.elementary_charge)
    return charge