def get_hyperopt_model_string(model, data):
    model_string = inspect.getsource(model)
    lines = model_string.split("\n")
    lines = [line for line in lines if not line.strip().startswith('#')]

    calling_script_file = os.path.abspath(inspect.stack()[-1][1])
    with open(calling_script_file, 'r') as f:
        calling_lines = f.read().split('\n')
        raw_imports = [line.strip() + "\n" for line in calling_lines if line in "import"]
        imports = ''.join(raw_imports)

    model_string = [line + "\n" for line in lines if "import" not in line]
    model_string = ''.join(model_string)

    parts = hyperparameter_names(model_string)
    aug_parts = augmented_names(parts)

    hyperopt_params = get_hyperparameters(model_string)
    space = get_hyperopt_space(parts, hyperopt_params)

    data_string = retrieve_data_string(data)
    model = hyperopt_keras_model(model_string, parts, aug_parts)

    temp_str = temp_string(imports, model, data_string, space)
    return temp_str
dataset/ETHPy150Open maxpumperla/hyperas/hyperas/optim.py/get_hyperopt_model_string/swapped operands of `in`