nodes: 0, module; 1, function_definition; 2, function_name:force_seek; 3, parameters; 4, block; 5, identifier:fd; 6, identifier:offset; 7, default_parameter; 8, expression_statement; 9, try_statement; 10, identifier:chunk; 11, identifier:CHUNK; 12, comment:""" Force adjustment of read cursort to specified offset
  
      This function takes a file descriptor ``fd`` and tries to seek to position
      specified by ``offset`` argument. If the descriptor does not support the
      ``seek()`` method, it will fall back to ``emulate_seek()``.
  
      The optional ``chunk`` argument can be used to adjust the chunk size for
      ``emulate_seek()``.
      """; 13, block; 14, except_clause; 15, expression_statement; 16, tuple; 17, comment:# This file handle probably has no seek(); 18, block; 19, call; 20, identifier:AttributeError; 21, attribute; 22, expression_statement; 23, attribute; 24, argument_list; 25, identifier:io; 26, identifier:UnsupportedOperation; 27, call; 28, identifier:fd; 29, identifier:seek; 30, identifier:offset; 31, identifier:emulate_seek; 32, argument_list; 33, identifier:fd; 34, identifier:offset; 35, identifier:chunk
code: def force_seek(fd, offset, chunk=CHUNK):
      """ Force adjustment of read cursort to specified offset
  
      This function takes a file descriptor ``fd`` and tries to seek to position
      specified by ``offset`` argument. If the descriptor does not support the
      ``seek()`` method, it will fall back to ``emulate_seek()``.
  
      The optional ``chunk`` argument can be used to adjust the chunk size for
      ``emulate_seek()``.
      """
      try:
          fd.seek(offset)
      except (AttributeError, io.UnsupportedOperation):
          # This file handle probably has no seek()
          emulate_seek(fd, offset, chunk)