<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def load_existing(self):
 """ advanced usage allows loading multiple sets of neurons and using a config object to keep track of the different graphs """

        from pyontutils.closed_namespaces import rdfs
        # bag existing

        try:
            next(iter(self.neurons()))
            raise self.ExistingNeuronsError('Existing neurons detected. Please '
                                            'load from file before creating neurons!')
        except StopIteration:
            pass

        def getClassType(s):
            graph = self.load_graph
            Class = infixowl.Class(s, graph=graph)
            for ec in Class.equivalentClass:
                if isinstance(ec.identifier, rdflib.BNode):
                    bc = infixowl.CastClass(ec, graph=graph)
                    if isinstance(bc, infixowl.BooleanClass):
                        for id_ in bc._rdfList:
                            if isinstance(id_, rdflib.URIRef):
                                yield id_  # its one of our types

        # bug is that I am not wiping graphBase.knownClasses and swapping it for each config
        # OR the bug is that self.load_graph is persisting, either way the call to type()
        # below seems to be the primary suspect for the issue
        if not graphBase.ignore_existing:
            ogp = Path(graphBase.ng.filename)  # FIXME ng.filename <-> out_graph_path property ...
            if ogp.exists():
                from itertools import chain
                from rdflib import Graph  # FIXME
                self.load_graph = Graph().parse(graphBase.ng.filename, format='turtle')
                graphBase.load_graph = self.load_graph
                # FIXME memory inefficiency here ...
                _ = [graphBase.in_graph.add(t) for t in graphBase.load_graph]  # FIXME use conjuctive ...
                if len(graphBase.python_subclasses) == 2:  # FIXME magic number for Neuron and NeuronCUT
                    ebms = [type(OntId(s).suffix, (NeuronCUT,), dict(owlClass=s))
                            for s in self.load_graph[:rdfs.subClassOf:NeuronEBM.owlClass]
                            if not graphBase.knownClasses.append(s)]
                else:
                    ebms = []

                class_types = [(type, s) for s in self.load_graph[:rdf.type:owl.Class]
                               for type in getClassType(s) if type]
                sc = None
                for sc in chain(graphBase.python_subclasses, ebms):
                    sc.owlClass
                    iris = [s for type, s in class_types if type == sc.owlClass]
                    if iris:
                        sc._load_existing(iris)

                if sc is None:
                    raise ImportError(f'Failed to find any neurons to load in {graphBase.ng.filename}')