code: def main(input_path, output_path):
      imgs_path = sorted(glob(f"{input_path}/*"))
      for img_path in imgs_path:
          img_name = img_path.split("/")[-1].split(".")[0]
          out_file = open(f"{output_path}/{img_name}.txt", "w")
          print(f"Processing new image {img_name}...")
          img = io.imread(img_path)
          img = gray_img(img)
          horizontal = IsHorizontal(img)
          if horizontal == False:
              theta = deskew(img)
              img = rotation(img, theta)
              img = get_gray(img)
              img = get_thresholded(img, threshold_otsu(img))
              img = get_closer(img)
              horizontal = IsHorizontal(img)
  
          original = img.copy()
          gray = get_gray(img)
          bin_img = get_thresholded(gray, threshold_otsu(gray))
  
          segmenter = Segmenter(bin_img)
          imgs_with_staff = segmenter.regions_with_staff
          most_common = segmenter.most_common
  
          # imgs_without_staff = segmenter.regions_without_staff
  
          imgs_spacing = []
          imgs_rows = []
          coord_imgs = []
          for i, img in enumerate(imgs_with_staff):
              spacing, rows, no_staff_img = coordinator(img, horizontal)
              imgs_rows.append(rows)
              imgs_spacing.append(spacing)
              coord_imgs.append(no_staff_img)
  
          print("Recognize...")
          recognize(
              out_file,
              most_common,
              coord_imgs,
              imgs_with_staff,
              imgs_spacing,
              imgs_rows,
          )
          out_file.close()
          print("Done...")
  
file_path: Mozart/src/main.py
imports: from commonfunctions import *
  from pre_processing import *
  from connected_componentes import *
  from staff import calculate_thickness_spacing, remove_staff_lines, coordinator
  from segmenter import Segmenter
  from fit import predict
  from glob import glob
  import cv2
  import pickle
  from scipy.ndimage import binary_fill_holes
  from skimage.morphology import thin
  import argparse
label_desc: Use image node_id 6 for calling a global function with example usage: main(input_path, output_path) without return types