def __deepcopy__(self, memo):
        """Method used by copy.deepcopy().  This also uses the
        state_pickler to work correctly.
        """
        # Create a new instance.
        new = self.__class__()
        # If we have a saved state, use it for the new instance.  If
        # not, get our state and save that.
        saved_state = self._saved_state
        if len(saved_state) == 0:
            state = state_pickler.get_state(self)
            #FIXME: This is for streamline seed point widget position which
            #does not get serialized correctly
            if not is_old_pipeline():
                try:
                    st = state.children[0].children[4]
                    l_pos = st.seed.widget.position
                    st.seed.widget.position = [pos.item() for pos in l_pos]
                except (__HOLE__, AttributeError):
                    pass
            saved_state = pickle.dumps(state)
        new._saved_state = saved_state
        # In the unlikely case that a new instance is running, load
        # the saved state.
        if new.running:
            new._load_saved_state()
        return new

    ######################################################################
    # `Base` interface
    ######################################################################
dataset/ETHPy150Open enthought/mayavi/mayavi/core/base.py/Base.__deepcopy__