class_docstr: Mode-checking helper functions.
class_docstr_tok: ["Mode-checking","helper","functions","."]
code: def _check_can_seek(self):
      if not self.readable():
          raise io.UnsupportedOperation(
              "Seeking is only supported " "on files open for reading"
          )
      if not self.seekable():
          raise io.UnsupportedOperation(
              "The underlying file object " "does not support seeking"
          )
  
file_path: cpython/Lib/_compression.py
imports: import io
  import sys
label_desc: Use image node_id 4 for calling the BaseStream obj's underlying member method code with example usage: obj._check_can_seek() without return types