code: def get_fonts_ids(file, page_number):
      """Gives all fonts of a file (page_number = 0) or by page if specified"""
      fonts_ids = []
      for page in file["pages"]:
          if len(page["elements"]) > 0 and (
              page_number == 0 or page["pageNumber"] == page_number
          ):
              for element in page["elements"]:
                  walk(element, fonts_ids)
  
      return fonts_ids
  
file_path: doc-parsr/server/src/processing/MlHeadingDetectionModule/train_model/utils.py
imports: from collections import Counter
  from bs4 import BeautifulSoup
  from markdown import markdown
  import re
label_desc: Use image node_id 2 for calling a global function with example usage: get_fonts_ids(file, page_number) and returns: fonts_ids