def METHOD_NAME(name, field, integral, region=None, integration='volume'):
    """
    General helper function for accessing reference mapping data.
    Get data attribute `name` from reference mapping corresponding to
    `field` in `region` in quadrature points of the given `integral` and
    `integration` type.
    Parameters
    ----------
    name : str
        The reference mapping attribute name.
    field : Field instance
        The field defining the reference mapping.
    integral : Integral instance
        The integral defining quadrature points.
    region : Region instance, optional
        If given, use the given region instead of `field` region.
    integration : one of ('volume', 'surface', 'surface_extra')
        The integration type.
    Returns
    -------
    data : array
        The required data merged for all element groups.
    Notes
    -----
    Assumes the same element geometry in all element groups of the field!
    """
    data = None
    if region is None:
        region = field.region
    geo, _ = field.get_mapping(region, integral, integration)
    data = getattr(geo, name)
    return data