def callmethod(obj, method, default=None, *args, **kwargs):
    """Call a method but get a default value if it doesn't exist."""
    method = getattr(obj, method, None)
    if callable(method):
        return method(*args, **kwargs)
    return default
