def get_object(self, pid, type=None):
        '''Initialize and return a new
        :class:`~eulfedora.models.DigitalObject` instance from the same
        repository, passing along the connection credentials in use by
        the current object.  If type is not specified, the current
        DigitalObject class will be used.

        :param pid: pid of the object to return
        :param type: (optional) :class:`~eulfedora.models.DigitalObject`
           type to initialize and return
        '''
        if type is None:
            type = self.__class__
        return type(self.api, pid)
Initialize and return a new
        :class:`~eulfedora.models.DigitalObject` instance from the same
        repository, passing along the connection credentials in use by
        the current object.  If type is not specified, the current
        DigitalObject class will be used.

        :param pid: pid of the object to return
        :param type: (optional) :class:`~eulfedora.models.DigitalObject`
           type to initialize and return