docstr: Try to lock the given filehandle
  
  returns LockException if it fails
docstr_tok: ["Try","to","lock","the","given","filehandle","returns","LockException","if","it","fails"]
code: def _get_lock(self, fh):
      """
      Try to lock the given filehandle
  
      returns LockException if it fails"""
      portalocker.lock(fh, self.flags)
      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 5 for calling the Lock obj's underlying member method code with example usage: obj._get_lock(fh) and returns: fh