def _function(object):
    """Ensures that the object is a function. Wraps the object in a function otherwise.
    Args:
        object: object to be wrapped as function

    Returns: function with the wrapped object.
    """
    if hasattr(object, '__call__'):
        return object

    return lambda: object