code: def _set_datapath(self, datapath):
          
          if datapath:
              self._datapath = datapath.rstrip(os.sep)
              self._fifo = int(stat.S_ISFIFO(os.stat(self.datapath).st_mode))
          else:
              self._datapath = None
              self._fifo = False
docs: Set a datapath.