# Path: gmql/managers.py
# def get_gateway():
#     global __gateway
# 
#     if __gateway is None:
#         # Starting the GMQL manager
#         start()
#         return __gateway
#     else:
#         return __gateway
# 
# def get_python_manager():
#     global __pythonManager
# 
#     if __pythonManager is None:
#         # Starting the GMQL manager
#         start()
#         return __pythonManager
#     else:
#         return __pythonManager


from py4j.java_collections import ListConverter
from .managers import get_gateway, get_python_manager


def to_java_list(l):
    gateway = get_gateway()
    ListConverter().convert(l, gateway)


def none():
    return get_python_manager().getNone()


def Some(thing):

# Path: gmql/managers.py
# def get_gateway():
#     global __gateway
# 
#     if __gateway is None:
#         # Starting the GMQL manager
#         start()
#         return __gateway
#     else:
#         return __gateway
# 
# def get_python_manager():
#     global __pythonManager
# 
#     if __pythonManager is None:
#         # Starting the GMQL manager
#         start()
#         return __pythonManager
#     else:
#         return __pythonManager


# Path: gmql/scala_wrapper.py
from py4j.java_collections import ListConverter
from .managers import get_gateway, get_python_manager



def to_java_list(l):
    gateway = get_gateway()
    ListConverter().convert(l, gateway)


def none():
    return get_python_manager().getNone()


def Some(thing):

    return get_python_manager().getSome(thing)