def METHOD_NAME(ctx: FunctionContext) -> MypyType:
    """This hook helps when we create the pipeline from sequence of funcs."""
    if not isinstance(ctx.default_return_type, Instance):
        return ctx.default_return_type
    if not ctx.arg_types[0]:  # We do require to pass `*functions` arg.
        ctx.api.fail('Too few arguments for "pipe"', ctx.context)
        return ctx.default_return_type
    arg_types = [arg_type[0] for arg_type in ctx.arg_types if arg_type]
    first_step, last_step = _get_pipeline_def(arg_types, ctx)
    if not isinstance(first_step, FunctionLike):
        return ctx.default_return_type
    if not isinstance(last_step, FunctionLike):
        return ctx.default_return_type
    return ctx.default_return_type.copy_modified(
        args=[
            # First type argument represents first function arguments type:
            _unify_type(first_step, _get_first_arg_type),
            # Second argument represents pipeline final return type:
            _unify_type(last_step, lambda case: case.ret_type),
            # Other types are just functions inside the pipeline:
            *arg_types,
        ],
    )