original_docstring: Used to clamp the size of operations performed on the .dat in order
          to not go outside the game file.
          
docstring: Used to clamp the size of operations performed on the .dat in order
  to not go outside the game file.
docstring_tokens: Used to clamp the size of operations performed on the . dat in order to not go outside the game file .
code: def _clamp_op(self, size):
          """Used to clamp the size of operations performed on the .dat in order
          to not go outside the game file.
          """
          max_size = max(0, self.end - self.dat_file.tell())
  
          if size < 0:
              # operation is performed until EOF is reached. limit to max_size.
              return max_size
  
          # don't go outside max_size.
          return min(size, max_size)
code_tokens: def _clamp_op ( self , size ) : max_size = max ( 0 , self . end - self . dat_file . tell ( ) ) if size < 0 : return max_size return min ( size , max_size )
short_docstring: Used to clamp the size of operations performed on the .dat in order
  to not go outside the game file.
short_docstring_tokens: Used to clamp the size of operations performed on the . dat in order to not go outside the game file .
comment: """Used to clamp the size of operations performed on the .dat in order
          to not go outside the game file.
          """$SEP$# operation is performed until EOF is reached. limit to max_size.$SEP$# don't go outside max_size.