def createActor(self, newActorClass, targetActorRequirements, globalName,
                    sourceHash = None):
        naa = self._addrManager.createLocalAddress()
        if getattr(self, '_exiting', False):
            return naa

        if not globalName:
            try:
                self._startChildActor(naa, newActorClass, self.myAddress,
                                      notifyAddr = self.myAddress,
                                      childRequirements = targetActorRequirements,
                                      sourceHash = sourceHash or self._sourceHash)
                # transport will contrive to call _pendingActorReady when the
                # child is initialized and connected to this parent.
                return naa
            except NoCompatibleSystemForActor:
                pass
            except __HOLE__:  # hash source may not be available locally
                pass

        # Cannot create the actor directly, so ask the Admin for help
        actorClassName = '%s.%s'%(newActorClass.__module__,
                                  newActorClass.__name__) if hasattr(newActorClass, '__name__') else newActorClass
        self._send_intent(
            TransmitIntent(self._adminAddr,
                           PendingActor(actorClassName,
                                        self.transport.myAddress,
                                        naa.addressDetails.addressInstanceNum,
                                        targetActorRequirements,
                                        globalName=globalName,
                                        sourceHash=sourceHash or self._sourceHash)))
        return naa
dataset/ETHPy150Open godaddy/Thespian/thespian/system/actorManager.py/ActorManager.createActor