docstr: Prepare the filehandle for usage
  
  If truncate is a number, the file will be truncated to that amount of
  bytes
docstr_tok: ["Prepare","the","filehandle","for","usage","If","truncate","is","a","number",",","the","file","will","be","truncated","to","that","amount","of","bytes"]
code: def _prepare_fh(self, fh):
      """
      Prepare the filehandle for usage
  
      If truncate is a number, the file will be truncated to that amount of
      bytes
      """
      if self.truncate:
          fh.seek(0)
          fh.truncate(0)
  
      return fh
  
imports: import os
  import time
  import atexit
  import tempfile
  import contextlib
  from .None import exceptions
  from .None import constants
  from .None import portalocker
label_desc: Use image node_id 6 for calling the Lock obj's underlying member method code with example usage: obj._prepare_fh(fh) and returns: fh