code: def norm_mock():
      def norm(x: torch.Tensor):
          return x.norm()
  
      norm_mock = Mock(side_effect=norm, spec=norm)
      norm_mock.configure_mock(**{"__name__": "norm"})
      norm_mock.reset_mock()
      return norm_mock
  
imports: from unittest.mock import Mock
  import pytest
  import torch
label_desc: Use image node_id 1 for calling a global function with example usage: norm_mock() and returns: norm_mock, x