original_docstring:  Context manager that conveniently grabs a connection from the pool and provides it with the context
          cleanly closes up the connection and restores it to the pool afterwards
  
          :param host: the rexpro server to connect to
          :type host: str (ip address)
          :param port: the rexpro server port to connect to
          :type port: int
          :param graph_name: the graph to connect to
          :type graph_name: str
          :param graph_obj_name: The graph object to use
          :type graph_obj_name: str
          :param username: the username to use for authentication (optional)
          :type username: str
          :param password: the password to use for authentication (optional)
          :type password: str
          
docstring: Context manager that conveniently grabs a connection from the pool and provides it with the context
  cleanly closes up the connection and restores it to the pool afterwards
docstring_tokens: Context manager that conveniently grabs a connection from the pool and provides it with the context cleanly closes up the connection and restores it to the pool afterwards
code: def connection(self, *args, **kwargs):
          """ Context manager that conveniently grabs a connection from the pool and provides it with the context
          cleanly closes up the connection and restores it to the pool afterwards
  
          :param host: the rexpro server to connect to
          :type host: str (ip address)
          :param port: the rexpro server port to connect to
          :type port: int
          :param graph_name: the graph to connect to
          :type graph_name: str
          :param graph_obj_name: The graph object to use
          :type graph_obj_name: str
          :param username: the username to use for authentication (optional)
          :type username: str
          :param password: the password to use for authentication (optional)
          :type password: str
          """
          conn = self.create_connection(*args, **kwargs)
          if not conn:
              raise RexProConnectionException("Cannot commit because connection was closed: %r" % (conn, ))
  
          try:
              with conn.transaction():
                  yield conn
          finally:
              self.close_connection(conn, soft=True)
code_tokens: def connection ( self , * args , ** kwargs ) : conn = self . create_connection ( * args , ** kwargs ) if not conn : raise RexProConnectionException ( "Cannot commit because connection was closed: %r" % ( conn , ) ) try : with conn . transaction ( ) : yield conn finally : self . close_connection ( conn , soft = True )
short_docstring: Context manager that conveniently grabs a connection from the pool and provides it with the context
  cleanly closes up the connection and restores it to the pool afterwards
short_docstring_tokens: Context manager that conveniently grabs a connection from the pool and provides it with the context cleanly closes up the connection and restores it to the pool afterwards
comment: """ Context manager that conveniently grabs a connection from the pool and provides it with the context
          cleanly closes up the connection and restores it to the pool afterwards
  
          :param host: the rexpro server to connect to
          :type host: str (ip address)
          :param port: the rexpro server port to connect to
          :type port: int
          :param graph_name: the graph to connect to
          :type graph_name: str
          :param graph_obj_name: The graph object to use
          :type graph_obj_name: str
          :param username: the username to use for authentication (optional)
          :type username: str
          :param password: the password to use for authentication (optional)
          :type password: str
          """