code: def remove(self, identifier: Union[DataObjectReplica, int]):
          
          if isinstance(identifier, int):
              self._remove_by_number(identifier)
          elif isinstance(identifier, DataObjectReplica):
              self._remove_by_object(identifier)
          else:
              raise TypeError("Can only remove by number or by object reference: `%s` given" % type(identifier))
docs: Removes a data object from this collection that has the given unique identifier. A `ValueError` will be raised
          if a data object with the given identifier does not exist.
          :param identifier: the identifier of the data object