          RETURNS (int): The index of the new pipeline component.
          """
          all_args = {"before": before, "after": after, "first": first, "last": last}
          if sum(arg is not None for arg in [before, after, first, last]) >= 2:
              raise ValueError(Errors.E006.format(args=all_args, opts=self.pipe_names))
          if last or not any(value is not None for value in [first, before, after]):
              return len(self.pipeline)
          elif first:
              return 0
          elif isinstance(before, str):
 
</s> remove             return len(self.pipeline)
 </s> add             return len(self._pipeline) </s> remove             if before not in self.pipe_names:
                raise ValueError(Errors.E001.format(name=before, opts=self.pipe_names))
            return self.pipe_names.index(before)
 </s> add             if before not in self._pipe_names:
                raise ValueError(Errors.E001.format(name=before, opts=self._pipe_names))
            return self._pipe_names.index(before) </s> remove             if after not in self.pipe_names:
                raise ValueError(Errors.E001.format(name=after, opts=self.pipe_names))
            return self.pipe_names.index(after) + 1
 </s> add             if after not in self._pipe_names:
                raise ValueError(Errors.E001.format(name=after, opts=self._pipe_names))
            return self._pipe_names.index(after) + 1 </s> remove         raise ValueError(Errors.E006.format(args=all_args, opts=self.pipe_names))
 </s> add         raise ValueError(Errors.E006.format(args=all_args, opts=self._pipe_names)) </s> remove         if name in self.pipe_names:
            raise ValueError(Errors.E007.format(name=name, opts=self.pipe_names))
 </s> add         if name in self._pipe_names:
            raise ValueError(Errors.E007.format(name=name, opts=self._pipe_names))
            raise ValueError(Errors.E006.format(args=all_args, opts=self._pipe_names))
          RETURNS (int): The index of the new pipeline component.
          """
          all_args = {"before": before, "after": after, "first": first, "last": last}
          if sum(arg is not None for arg in [before, after, first, last]) >= 2:
            raise ValueError(Errors.E006.format(args=all_args, opts=self._pipe_names))
          if last or not any(value is not None for value in [first, before, after]):
              return len(self.pipeline)
          elif first:
              return 0
          elif isinstance(before, str):
keep keep keep keep replace keep keep keep keep keep
 Allow loaded but disabled components 
spacy/language.py