class_docstr: Abstract base class for trials.
  
  A Trial is essentially a collection of user hooks that will be called by the TrialController.
  Frameworks should create framework-specific subclasses to specify framework-specific hooks.
class_docstr_tok: ["Abstract","base","class","for","trials",".","A","Trial","is","essentially","a","collection","of","user","hooks","that","will","be","called","by","the","TrialController",".","Frameworks","should","create","framework-specific","subclasses","to","specify","framework-specific","hooks","."]
docstr: Initializes a trial using the provided ``context``.
  
  Override this method to initialize any common state that is shared
  by the other methods in the trial class. it is also typically useful
  to store ``context`` as an instance variable so that it can be accessed
  by other methods.
docstr_tok: ["Initializes","a","trial","using","the","provided","``","context","``",".","Override","this","method","to","initialize","any","common","state","that","is","shared","by","the","other","methods","in","the","trial","class",".","it","is","also","typically","useful","to","store","``","context","``","as","an","instance","variable","so","that","it","can","be","accessed","by","other","methods","."]
code: def __init__(self, context: det.TrialContext) -> None:
      """
      Initializes a trial using the provided ``context``.
  
      Override this method to initialize any common state that is shared
      by the other methods in the trial class. it is also typically useful
      to store ``context`` as an instance variable so that it can be accessed
      by other methods.
      """
      pass
  
imports: import abc
  from typing import Optional, Type
  import determined
label_desc: Use image node_id 1 to create a new LegacyTrial object  with example: obj = LegacyTrial(context)