code: def get_metric_mock(params: dict[str, Any]) -> Mock:
      mock = Mock()
      mock.id = params["id"]
      mock.metric_name = params["metric_name"]
      mock.metric_name = params["verbose_name"]
      mock.description = params["description"]
      mock.expression = params["expression"]
      mock.warning_text = params["warning_text"]
      mock.d3format = params["d3format"]
      return mock
  
imports: from typing import Any
  from unittest.mock import Mock
label_desc: Use image node_id 2 for calling a global function with example usage: get_metric_mock(params) and returns: mock