def get_default_batcher(
    iterable,
    batcher=None,
    transform_fn=None,
    size_calc_fn=None,
    progress=False,
    total=None,
):
    """Returns a :class:`Batcher` over ``iterable`` using defaults from your
    FiftyOne config.

    If no ``batcher`` is provided, this method uses
    ``fiftyone.config.default_batcher`` to determine the implementation to use
    and related configuration values as needed for each.

    Args:
        iterable: an iterable to batch over. If ``None``, the result of
            ``next()`` will be a batch size instead of a batch, and is an
            infinite iterator
        batcher (None): a specific :class:`Batcher` subclass to use, or
            ``False`` to disable batching
        transform_fn (None): a transform function to apply to each item
        size_calc_fn (None): a function that calculates the size of each item.
            This is applied after ``transform_fn`` if both are provided.
            Only applicable when ``fiftyone.config.default_batcher="size"``
        progress (False): whether to render a progress bar tracking the
            consumption of the batches (True/False), use the default value
            ``fiftyone.config.show_progress_bars`` (None), or a progress
            callback function to invoke instead
        total (None): the length of ``iterable``. Only applicable when
            ``progress=True``. If not provided, it is computed via
            ``len(iterable)``, if possible

    Returns:
        a :class:`Batcher` instance
    """
    if batcher is False:
        batcher = partial(StaticBatcher, batch_size=100000)

    if batcher is not None:
        return batcher(
            iterable,
            transform_fn=transform_fn,
            progress=progress,
            total=total,
        )

    default_batcher = fo.config.default_batcher
    if default_batcher == "latency":
        target_latency = fo.config.batcher_target_latency
        return LatencyDynamicBatcher(
            iterable,
            target_latency=target_latency,
            init_batch_size=1,
            max_batch_beta=8.0,
            max_batch_size=100000,
            transform_fn=transform_fn,
            progress=progress,
            total=total,
        )
    elif default_batcher == "size":
        target_content_size = fo.config.batcher_target_size_bytes
        return ContentSizeBatcher(
            iterable,
            target_size=target_content_size,
            max_batch_size=100000,
            transform_fn=transform_fn,
            size_calc_fn=size_calc_fn,
            progress=progress,
            total=total,
        )
    elif default_batcher == "static":
        batch_size = fo.config.batcher_static_size
        return StaticBatcher(
            iterable,
            batch_size=batch_size,
            transform_fn=transform_fn,
            progress=progress,
            total=total,
        )
    else:
        raise ValueError(
            f"Invalid fo.config.default_batcher: '{default_batcher}'"
        )
Returns a :class:`Batcher` over ``iterable`` using defaults from your
    FiftyOne config.

    If no ``batcher`` is provided, this method uses
    ``fiftyone.config.default_batcher`` to determine the implementation to use
    and related configuration values as needed for each.

    Args:
        iterable: an iterable to batch over. If ``None``, the result of
            ``next()`` will be a batch size instead of a batch, and is an
            infinite iterator
        batcher (None): a specific :class:`Batcher` subclass to use, or
            ``False`` to disable batching
        transform_fn (None): a transform function to apply to each item
        size_calc_fn (None): a function that calculates the size of each item.
            This is applied after ``transform_fn`` if both are provided.
            Only applicable when ``fiftyone.config.default_batcher="size"``
        progress (False): whether to render a progress bar tracking the
            consumption of the batches (True/False), use the default value
            ``fiftyone.config.show_progress_bars`` (None), or a progress
            callback function to invoke instead
        total (None): the length of ``iterable``. Only applicable when
            ``progress=True``. If not provided, it is computed via
            ``len(iterable)``, if possible

    Returns:
        a :class:`Batcher` instance
    
fiftyone/core/utils.py