def get_api_base(api_func):
    """Return the API base for Ghidra's flat API

    :param api_func: Any function in Ghidra's flat API - eg. getInstructionAt
    :type: function

    :return: The api base
    :rtype: ghidra.python.PythonScript
    """
    return api_func.__self__