from typing import Iterable
from typing import Callable


def compose(transforms: Iterable[Callable]) -> Callable:
    """Helper function to compose transformations

    :param transforms: Iterable of transformation functions.
    :type transforms: Iterable[Callable]
    :return: Transform function
    :rtype: Callable
    """
    transforms = list(transforms)

    def inner(x):
        for transform in transforms:
            x = transform(x)
        return x

    return inner