code: def _encode_data(data, args):
      json_opts = (
          {"indent": 2, "sort_keys": True} if args.format else {}
      )
      return json.dumps(data, **json_opts)
  
imports: import json
  import click
  from guild import click_util
label_desc: Use image node_id 3 for calling a global function with example usage: _encode_data(data, args) and returns: json