Can’t extend some core classes

I am relatively new to wordpress development, I am trying to extend ‘Walker_Category_Checklist’ class found in /wp-admin/includes/class-walker-category-checklist.php to customize it for wp_terms_checklist() or wp_category_checklist() but when I try to require_once a link to my extended class in the child-theme function.php I get this error and site not loading!

Term Checklist Walker – Disable Parent Categories

Currently I have a structure where the top level categories are acting like landing pages, so they should have no posts directly assigned to them. What I would like to do is disable the top level terms and only allow the user to check sub-terms (children). I’ve found a walker which transforms checkboxes to radio buttons here but I don’t quite understand it enough to only change the top level parent, it keeps cascading. Was hoping somebody could break down what is going on in this walker with the main question being “How do I disable top level terms in the admin panel term metabox”