docstr: The Policy composes the scorer and sampler to create actions.
  
  Args:
      scorer: given preprocessed input, outputs intermediate scores
          used for sampling actions
      sampler: given scores (from the scorer), samples an action.
docstr_tok: ["The","Policy","composes","the","scorer","and","sampler","to","create","actions",".","Args",":","scorer",":","given","preprocessed","input",",","outputs","intermediate","scores","used","for","sampling","actions","sampler",":","given","scores","(","from","the","scorer",")",",","samples","an","action","."]
code: def __init__(self, scorer: Scorer, sampler: Sampler) -> None:
      """
      The Policy composes the scorer and sampler to create actions.
  
      Args:
          scorer: given preprocessed input, outputs intermediate scores
              used for sampling actions
          sampler: given scores (from the scorer), samples an action.
      """
      self.scorer = scorer
      self.sampler = sampler
  
imports: from typing import Any, Optional
  import reagent.core.types
  import torch
  from reagent.gym.types import Sampler, Scorer
label_desc: Use image node_id 1 to create a new Policy object  with example: obj = Policy(scorer, sampler)