code: def socket_patches(mocker):
      Patches = namedtuple("Patches", ["socket"])
      mock_patch = Patches(mocker.patch("socket.socket"))
      mock_patch.socket.recv.return_value = b"1"
      return mock_patch
  
file_path: serve/ts/tests/unit_tests/test_otf_codec_protocol.py
imports: import struct
  from builtins import bytes
  from collections import namedtuple
  import pytest
  import ts.protocol.otf_message_handler
label_desc: Use image node_id 1 for calling a global function with example usage: socket_patches(mocker) and returns: mock_patch