def METHOD_NAME(self, function: Callable, *args, **kwargs):
    try:
        return function(*args, **kwargs)
    # This can be anything since it comes from the user function, we don't
    # want to let the user function crash the UI
    except Exception as err:  # pylint: disable=broad-except
        self.logger.error(f"Error calling Python function {function.__name__}")
        self.logger.error(err)
    finally:
        self._client.unlock_elements()
        self._client.flet_update()
    return None