code: def check_output(self, cmd):
      with self.lock:
          self.check_call(cmd)
          return_string = "command-output"
          key_to_shrink = None
          for pattern, response_list in self.call_response.items():
              if pattern in str(cmd):
                  return_string = response_list[0]
                  key_to_shrink = pattern
                  break
          if key_to_shrink:
              self.call_response[key_to_shrink] = self.call_response[
                  key_to_shrink
              ][1:]
              if len(self.call_response[key_to_shrink]) == 0:
                  del self.call_response[key_to_shrink]
  
          return return_string.encode()
  
imports: import re
  import threading
  from subprocess import CalledProcessError
  from typing import Callable, Dict, List, Optional
  from ray.autoscaler.node_provider import NodeProvider
label_desc: Use image node_id 3 for calling the MockProcessRunner obj's underlying member method code with example usage: obj.check_output(cmd) and returns: return_string