def METHOD_NAME(
    detector,
    detector_distance,
    shape,
    center=None,
    affine=None,
    mask=None,
    wavelength=None,
    **kwargs
):
    """Basic method for creating a azimuthal integrator.
    This helps to deal with taking some of the pyXEM standards and apply them to pyFAI
    Parameters
    ----------
    detector: pyFAI.detectors.Detector
        The detector to be integrated
    detector_distance:
        distance sample - detector plan (orthogonal distance, not along the beam), in meter.
    shape: (int, int)
        The shape of the signal we are operating on. For the
    center: (float, float)
        The center of the diffraction pattern
    affine: (3x3)
        The affine transformation to apply to the data
    mask: np.array
        A boolean array to be added to the integrator.
    wavelength: float
        The wavelength of the beam in meter. Needed to accounting for the
        Ewald sphere.
    kwargs: dict
        Any additional arguments to the Azimuthal Integrator class
    """
    if center is None:
        center = np.divide(shape, 2)  # Center is middle of the image
    if affine is not None:
        # create spline representation with (dx,dy) displacements
        dx, dy = _get_displacements(center=center, shape=shape, affine=affine)
        detector.max_shape = shape
        detector.shape = shape
        detector.set_dx(dx)
        detector.set_dy(dy)
    ai = AzimuthalIntegrator(
        detector=detector, dist=detector_distance, wavelength=wavelength, **kwargs
    )
    if mask is not None:
        ai.set_mask(mask)
    if wavelength is not None:
        ai.wavelength = wavelength
    ai.setFit2D(
        directDist=detector_distance * 1000, centerX=center[1], centerY=center[0]
    )
    return ai