docstr: Construct an Evaluator that can look up variables from the given frame.
  
  :param frame: a frame object, e.g. from a traceback or `inspect.currentframe().f_back`.
docstr_tok: ["Construct","an","Evaluator","that","can","look","up","variables","from","the","given","frame",".",":","param","frame",":","a","frame","object",",","e.g",".","from","a","traceback","or","`","inspect.currentframe","(",")",".f_back","`","."]
code: def from_frame(cls, frame: FrameType) -> "Evaluator":
      """
      Construct an Evaluator that can look up variables from the given frame.
  
      :param frame: a frame object, e.g. from a traceback or `inspect.currentframe().f_back`.
      """
  
      return cls(
          ChainMap(
              ensure_dict(frame.f_locals),
              ensure_dict(frame.f_globals),
              ensure_dict(frame.f_builtins),
          )
      )
  
imports: import ast
  import builtins
  import operator
  from collections import ChainMap, OrderedDict, deque
  from contextlib import suppress
  from types import FrameType
  from typing import Any, Tuple, Iterable, List, Mapping, Dict, Union, Set
  from pure_eval.my_getattr_static import getattr_static
  from pure_eval.utils import CannotEval, has_ast_name, copy_ast_without_context, is_standard_types, of_standard_types, is_any, of_type, ensure_dict
label_desc: Use image node_id 2 for calling the Evaluator obj's underlying member method code with example usage: obj.from_frame(cls, frame) and returns: cls