code: def chmod(self, mode):
          
          if isinstance(mode, str):
              mask = _multi_permission_mask(mode)
              mode = mask(self.stat().st_mode)
          os.chmod(self, mode)
          return self
docs: Set the mode. May be the new mode (os.chmod behavior) or a `symbolic
          mode <http://en.wikipedia.org/wiki/Chmod#Symbolic_modes>`_.
  
          .. seealso:: :func:`os.chmod`