def get_python_function(mod, func_name):
    """Return Python function given its module and name.

    Args:
        mod (module): Python module.
        func_name (str): Python function name.

    Returns:
        callable: Python function.

    Raises:
        AttributeError: If the module does not contain the function.

    """
    try:
        return getattr(mod, func_name)
    except AttributeError:
        return False
