code: def setDirname(self, dirname):
          
          # Make sure the dirname always ends in
          # a path separator character
          sep = utils._getPathSep(dirname)
          if not dirname.endswith(sep):
              dirname += sep
  
          self._dir = utils.asString(dirname)
docs: Set a new directory name for the sequence.
  
          Args:
              dirname (str): the new directory name