code: def train_and_log_model(is_dummy=False):
      mlflow.set_experiment("demo")
      with mlflow.start_run() as run:
          X, y = load_diabetes(as_frame=True, return_X_y=True)
          model = (
              DummyRegressor(strategy="constant", constant=42)
              if is_dummy
              else LinearRegression()
          )
          fitted_model = model.fit(X, y)
          mlflow.sklearn.log_model(
              fitted_model, artifact_path="train/model"
          )
          return run.info.run_id, fitted_model
  
imports: import os
  import random
  import shutil
  import string
  from contextlib import contextmanager
  from pathlib import Path
  from typing import Generator, Optional
  from sklearn.datasets import load_diabetes, load_iris
  from sklearn.dummy import DummyClassifier, DummyRegressor
  from sklearn.linear_model import LinearRegression, LogisticRegression
  import mlflow
  from mlflow.recipes.step import BaseStep
  from mlflow.recipes.steps.split import _OUTPUT_TEST_FILE_NAME, _OUTPUT_VALIDATION_FILE_NAME
label_desc: Use image node_id 3 for calling a global function with example usage: train_and_log_model(is_dummy) and returns: run,  fitted_model