code: def umask(self, new_mask):
          
          if not is_int_type(new_mask):
              raise TypeError('an integer is required')
          old_umask = self.filesystem.umask
          self.filesystem.umask = new_mask
          return old_umask
docs: Change the current umask.
  
          Args:
              new_mask: (int) The new umask value.
  
          Returns:
              The old umask.
  
          Raises:
              TypeError: if new_mask is of an invalid type.