code: def update_union(self, data, val):
      """JsonPath Union class patch to support updating."""
      with suppress(TypeError):
          self.left.update(data, val)
  
      with suppress(TypeError):
          self.right.update(data, val)
  
imports: from urllib.parse import urlparse, parse_qsl, urlunparse, urlencode
  from json.decoder import JSONDecodeError
  from typing import Any, Union, List, Optional
  from http.client import responses
  from contextlib import suppress
  from functools import reduce
  from pathlib import Path
  import importlib
  import operator
  import tarfile
  import json
  from jsonpath_ng.ext import parse
  from jsonpath_ng import jsonpath, DatumInContext
  from tqdm import tqdm
  import requests
label_desc: Use image node_id 1 for calling a global function with example usage: update_union(data, val) without return types