code: def _ensure_mock_call_object(obj, **kwargs):
      if isinstance(obj, _mock_call_type):
          return obj
      elif isinstance(obj, str):
          cmd = re.split(r"\s+", obj)
          return mock.call(cmd, **kwargs)
      elif isinstance(obj, list):
          return mock.call(obj, **kwargs)
      else:
          raise TypeError(obj)
  
file_path: arrow/dev/archery/archery/testing.py
imports: from contextlib import contextmanager
  import os
  from unittest import mock
  import re
label_desc: Use image node_id 1 for calling a global function with example usage: _ensure_mock_call_object(obj) and returns: obj, mock, mock