code: def trajectory_length(self, itraj, stride=1, skip=0):
          r
          if itraj >= self.ntraj:
              raise IndexError("given index (%s) exceeds number of data sets (%s)."
                               " Zero based indexing!" % (itraj, self.ntraj))
          if not IteratorState.is_uniform_stride(stride):
              selection = stride[stride[:, 0] == itraj][:, 0]
              return 0 if itraj not in selection else len(selection)
          else:
              res = max((self._lengths[itraj] - skip - 1) // int(stride) + 1, 0)
              return res
docs: r"""Returns the length of trajectory of the requested index.
  
          Parameters
          ----------
          itraj : int
              trajectory index
          stride : int
              return value is the number of frames in the trajectory when
              running through it with a step size of `stride`.
          skip: int or None
              skip n frames.
  
          Returns
          -------
          int : length of trajectory