def METHOD_NAME(self, args, kwargs, _warning, expected):
    """
    Test scenarios the cause plasma_frequency to issue a warning.
    """
    with pytest.warns(_warning):
        wp = plasma_frequency(*args, **kwargs)
        assert isinstance(wp, u.Quantity)
        assert wp.unit == u.rad / u.s
    if expected is not None:
        assert np.allclose(wp, expected)