code: def update_patterns(patterns: dict, new_patterns: dict):
      """
      updates a given pattern table with counts from another table by adding them to the given table.
  
      Args:
          patterns: main table
          new_patterns: new table to update the main table with
      """
      for k, v in new_patterns.items():
          patterns[k] += v
  
file_path: NeMo/examples/nlp/duplex_text_normalization/data/en/upsample.py
imports: import glob
  from argparse import ArgumentParser
  from collections import defaultdict
  from typing import List
  import numpy
  import regex
label_desc: Use image node_id 3 for calling a global function with example usage: update_patterns(patterns, new_patterns) without return types