code: def insert(self, i, arg):
          r
          arg = self.__coerce(arg)
  
          if isinstance(arg, Arg):
              super().insert(i, arg)
  
          if len(self) <= 1:
              self.all.append(arg)
          else:
              if i > len(self):
                  i = len(self) - 1
  
              before = self[i - 1]
              index_before = self.all.index(before)
              self.all.insert(index_before + 1, arg)
docs: r"""Insert whitespace, an unparsed argument string, or an argument
          object.
  
          :param int i: Index to insert argument into
          :param Arg arg: Argument to insert
  
          >>> arguments = TexArgs(['\n', RArg('arg0'), '[arg2]'])
          >>> arguments.insert(1, '[arg1]')
          >>> len(arguments)
          3
          >>> arguments
          [RArg('arg0'), OArg('arg1'), OArg('arg2')]
          >>> arguments.all
          ['\n', RArg('arg0'), OArg('arg1'), OArg('arg2')]
          >>> arguments.insert(10, '[arg3]')
          >>> arguments[3]
          OArg('arg3')