def remove_target(self, target):
        """ Removes a previously registered target. This unregisters the
        target, as well as removing it from the list of assigned targets. """
        target.remove()
        target_key = None
        for key, value_target in iteritems(self._targets):
            if target == value_target:
                target_key = key
                break
        del self._targets[target_key]
 Removes a previously registered target. This unregisters the
        target, as well as removing it from the list of assigned targets. 
metadrive/render_pipeline/rpcore/render_stage.py