<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def load_engine_and_libs(matlab_root, options):
 """Load and return `libeng` and `libmx`. Start and return MATLAB engine. Returns ------- engine libeng libmx """

    if sys.maxsize > 2**32:
        bits = '64bit'
    else:
        bits = '32bit'

    system = platform.system()

    if system == 'Linux':
        if bits == '64bit':
            lib_dir = join(matlab_root, "bin", "glnxa64")
        else:
            lib_dir = join(matlab_root, "bin", "glnx86")

        check_python_matlab_architecture(bits, lib_dir)

        libeng = Library(
            join(lib_dir, 'libeng.so')
        )
        libmx = Library(
            join(lib_dir, 'libmx.so')
        )

        command = "{executable} {options}".format(
            executable=join(matlab_root, 'bin', 'matlab'),
            options=options
        )

        ### Check for /bin/csh
        if not os.path.exists("/bin/csh"):
            warnings.warn("MATLAB engine requires /bin/csh.  Please install it on your system or matlab_wrapper will not work properly.")

    elif system == 'Windows':
        if bits == '64bit':
            lib_dir = join(matlab_root, "bin", "win64")
        else:
            lib_dir = join(matlab_root, "bin", "win32")

        check_python_matlab_architecture(bits, lib_dir)

        ## We need to modify PATH, to find MATLAB libs
        if lib_dir not in os.environ['PATH']:
            os.environ['PATH'] = lib_dir + ';' + os.environ['PATH']

        libeng = Library('libeng')
        libmx = Library('libmx')

        command = None

    elif system == 'Darwin':
        if bits == '64bit':
            lib_dir = join(matlab_root, "bin", "maci64")
        else:
            unsupported_platform(system, bits)

        check_python_matlab_architecture(bits, lib_dir)

        libeng = Library(
            join(lib_dir, 'libeng.dylib')
        )
        libmx = Library(
            join(lib_dir, 'libmx.dylib')
        )

        command = "{executable} {options}".format(
            executable=join(matlab_root, 'bin', 'matlab'),
            options=options
        )

    else:
        unsupported_platform(system, bits)

    ### Check MATLAB version
    try:
        version_str = c_char_p.in_dll(libeng, "libeng_version").value
        version = tuple([int(v) for v in version_str.split('.')[:2]])

    except ValueError:
        warnings.warn("Unable to identify MATLAB (libeng) version.")
        version = None

    if (system == 'Linux') and (version == (8, 3)) and (bits == '64bit'):
        warnings.warn("You are using MATLAB version 8.3 (R2014a) on Linux, which appears to have a bug in engGetVariable().  You will only be able to use arrays of type double.")

    elif (system == 'Darwin') and (version == (8, 3)) and (bits == '64bit'):
        warnings.warn("You are using MATLAB version 8.3 (R2014a) on OS X, which appears to have a bug in engGetVariable().  You will only be able to use arrays of type double.")

    ### Start the engine
    engine = libeng.engOpen(command)

    return engine, libeng, libmx, version