def METHOD_NAME():
    """Test sigmoidal fitting and generation."""
    n_pts = 1000
    x = np.random.RandomState(0).randn(n_pts)
    p0 = (0., 1., 0., 1.)
    y = ea.sigmoid(x, *p0)
    assert np.all(np.logical_and(y <= 1, y >= 0))
    p = ea.fit_sigmoid(x, y)
    assert_allclose(p, p0, atol=1e-4, rtol=1e-4)
    with warnings.catch_warnings(record=True):  # scipy convergence
        warnings.simplefilter('ignore')
        p = ea.fit_sigmoid(x, y, (0, 1, None, None), ('upper', 'lower'))
    assert_allclose(p, p0, atol=1e-4, rtol=1e-4)
    y += np.random.rand(n_pts) * 0.01
    p = ea.fit_sigmoid(x, y)
    assert_allclose(p, p0, atol=0.1, rtol=0.1)