def import_decorator(func):
    """Decorate a function to handle import error.

    Args:
        func: Function to be decorated.

    Returns:
        A decorated function.
    """
    def decorated_func(*args, **kwargs):
        try:
            return func(*args, **kwargs)
        except ImportError:
            return None
    return decorated_func