def resolve(obj):
    """
    Helper function.

    Check whether the given object is callable. If yes, return its return
    value, otherwise return the object itself.
    """
    return obj() if callable(obj) else obj