class_docstr: Implement a generic protocol to allow Orion to communicate using
  different storage backend
class_docstr_tok: ["Implement","a","generic","protocol","to","allow","Orion","to","communicate","using","different","storage","backend"]
docstr: Load algorithm lock info
  
  Parameters
  ----------
  experiment: Experiment, optional
     experiment object to retrieve from the database
  uid: str or int, optional
      experiment id used to retrieve the trial object.
  
  Returns
  -------
  ``orion.storage.base.LockedAlgorithmState``
      The locked state of the algorithm. Note that the lock is not acquired by the process
      calling ``get_algorithm_lock_info`` and the value of LockedAlgorithmState.locked
      may not be valid if another process is running and could acquire the lock concurrently.
docstr_tok: ["Load","algorithm","lock","info","Parameters","--","--","--","--","--","experiment",":","Experiment",",","optional","experiment","object","to","retrieve","from","the","database","uid",":","str","or","int",",","optional","experiment","id","used","to","retrieve","the","trial","object",".","Returns","--","--","--","-","``","orion.storage.base.LockedAlgorithmState","``","The","locked","state","of","the","algorithm",".","Note","that","the","lock","is","not","acquired","by","the","process","calling","``","get_algorithm_lock_info","``","and","the","value","of","LockedAlgorithmState.locked","may","not","be","valid","if","another","process","is","running","and","could","acquire","the","lock","concurrently","."]
code: def get_algorithm_lock_info(
      self,
      experiment: Experiment | None = None,
      uid: str | int | None = None,
  ) -> LockedAlgorithmState:
      """Load algorithm lock info
  
      Parameters
      ----------
      experiment: Experiment, optional
         experiment object to retrieve from the database
      uid: str or int, optional
          experiment id used to retrieve the trial object.
  
      Returns
      -------
      ``orion.storage.base.LockedAlgorithmState``
          The locked state of the algorithm. Note that the lock is not acquired by the process
          calling ``get_algorithm_lock_info`` and the value of LockedAlgorithmState.locked
          may not be valid if another process is running and could acquire the lock concurrently.
      """
      raise NotImplementedError()
  
imports: from __future__ import annotations
  import contextlib
  import copy
  import logging
  import typing
  from datetime import datetime
  from typing import Literal
  import orion.core
  from orion.core.io import resolve_config
  from orion.core.utils import GenericFactory
label_desc: Use image node_id 27 for calling the BaseStorageProtocol obj's underlying member method code with example usage: obj.get_algorithm_lock_info(experiment, uid) without return types