code: def make_filter_and_replace(filter, find_replace):
      if find_replace is None:
          find = None
          replace = None
      else:
          find, replace = find_replace
      return {
          "filterPattern": filter,
          "findPattern": find,
          "replacePattern": replace,
      }
  
file_path: hail/hail/python/hail/ir/utils.py
imports: from typing import Optional, List, Any, Tuple
  import hail
  from hail.utils.java import Env
  from hail.expr.types import tint32, tint64
label_desc: Use image node_id 9 for calling a global function with example usage: make_filter_and_replace(filter, find_replace) and returns: dict