code: def test_creation_and_hydration(run_data, run_info, run_inputs):
      run_data, metrics, params, tags = run_data
      (
          run_info,
          run_id,
          run_name,
          experiment_id,
          user_id,
          status,
          start_time,
          end_time,
          lifecycle_stage,
          artifact_uri,
      ) = run_info
      run_inputs, datasets = run_inputs
  
      run1 = Run(run_info, run_data, run_inputs)
  
      _check_run(run1, run_info, metrics, params, tags, datasets)
  
      expected_info_dict = {
          "run_uuid": run_id,
          "run_id": run_id,
          "run_name": run_name,
          "experiment_id": experiment_id,
          "user_id": user_id,
          "status": status,
          "start_time": start_time,
          "end_time": end_time,
          "lifecycle_stage": lifecycle_stage,
          "artifact_uri": artifact_uri,
      }
      assert run1.to_dictionary() == {
          "info": expected_info_dict,
          "data": {
              "metrics": {m.key: m.value for m in metrics},
              "params": {p.key: p.value for p in params},
              "tags": {t.key: t.value for t in tags},
          },
          "inputs": {"dataset_inputs": datasets},
      }
  
      proto = run1.to_proto()
      run2 = Run.from_proto(proto)
      _check_run(run2, run_info, metrics, params, tags, datasets)
  
      run3 = Run(run_info, None, None)
      assert run3.to_dictionary() == {"info": expected_info_dict}
  
      run4 = Run(run_info, None)
      assert run4.to_dictionary() == {"info": expected_info_dict}
  
file_path: mlflow/tests/entities/test_run.py
imports: import pytest
  from mlflow.entities import Dataset, DatasetInput, LifecycleStage, Metric, Run, RunData, RunInfo, RunInputs, RunStatus
  from mlflow.exceptions import MlflowException
  from tests.entities.test_run_data import _check
  from tests.entities.test_run_info import _check
  from tests.entities.test_run_inputs import _check
label_desc: Use image node_id 2 for calling a global function with example usage: test_creation_and_hydration(run_data, run_info, run_inputs) without return types