code: def textproto_format(space, key, value, json_encoder):
      """Rewrites a key-value pair from textproto as JSON."""
      if value.startswith(b'"'):
          evaluated = ast.literal_eval(value.decode("utf-8"))
          value = json_encoder.encode(evaluated).encode("utf-8")
      return b'%s["%s", %s]' % (space, key, value)
  
imports: import ast
  import errno
  import json
  import os
  import re
  import subprocess
  import stat
  import sys
  from collections import defaultdict, OrderedDict
label_desc: Use image node_id 1 for calling a global function with example usage: textproto_format(space, key, value, json_encoder) and returns: unknown