def maybe_curry(maybe_fn, first_arg) -> 'Function | Any':
    """
    If maybe_fn is a function, curries it and passes in first_arg. Otherwise
    returns maybe_fn.
    """
    if not callable(maybe_fn):
        return maybe_fn
    return tz.curry(maybe_fn)(first_arg)