To use the merge_pdfs function, simply import the module and call the function with the path to the directory containing the PDFs you want to merge and the path to the output PDF file.
For example:
from main import merge_pdfs
pdf_directory = './b4'
output_pdf = './after/merged_file.pdf'
merge_pdfs(pdf_directory, output_pdf)