def METHOD_NAME(operation="pr", issue_or_pr_number=None, pr_modified_file_paths=None, pr_branch=None, title=None):
    """Label issues and PRs based on the schema provided from title prefixes, paths and branches
    """
    labels = []
    json_schema = load_labels_schema()
    # Loop over all labels
    for k, v in json_schema.items():
        # Check title label. Label based on conventional commit title
        if title:
            labels = labels + check_title(title, k, v["auto-label"]["title-prefixes"], v["auto-label"]["paths"])
        # Check branch label
        if pr_branch:
            labels = labels + check_branch(pr_branch, k, v["auto-label"]["branch"])
        # Check modified file paths
        if pr_modified_file_paths:
            labels = labels + check_paths_in_pr(pr_modified_file_paths, k, v["auto-label"]["paths"])
    # removes duplicate labels and joins them by comma
    string_of_labels = ",".join(list(dict.fromkeys(labels)))
    try:
        print(f"gh {operation} edit {issue_or_pr_number} --add-label '{string_of_labels}'")
        # f"--add-project janssen-issue-dashboard") add when project beta are official and can be added
        exec_cmd(f"gh {operation} edit {issue_or_pr_number} --add-label '{string_of_labels}'")
    except Exception as e:
        print(f"Couldn't add the label to the PR {issue_or_pr_number} because {e}")