def METHOD_NAME(self, module):
    model_class_definitions = list_classes_from_module(module)
    if len(model_class_definitions) != 1:
        raise ValueError(
            "Expected only one class in custom service code or a function entry point {}".format(
                model_class_definitions
            )
        )
    model_class = model_class_definitions[0]
    model_service = model_class()
    if not hasattr(model_service, "handle"):
        raise ValueError(
            "Expect handle method in class {}".format(str(model_class))
        )
    return model_service.handle, model_service.initialize