class_docstr: The sandboxed environment.  It works like the regular environment but
  tells the compiler to generate sandboxed code.  Additionally subclasses of
  this environment may override the methods that tell the runtime what
  attributes or functions are safe to access.
  
  If the template tries to access insecure code a :exc:`SecurityError` is
  raised.  However also other exceptions may occur during the rendering so
  the caller has to ensure that all exceptions are caught.
class_docstr_tok: ["The","sandboxed","environment",".","It","works","like","the","regular","environment","but","tells","the","compiler","to","generate","sandboxed","code",".","Additionally","subclasses","of","this","environment","may","override","the","methods","that","tell","the","runtime","what","attributes","or","functions","are","safe","to","access",".","If","the","template","tries","to","access","insecure","code","a",":","exc",":","`","SecurityError","`","is","raised",".","However","also","other","exceptions","may","occur","during","the","rendering","so","the","caller","has","to","ensure","that","all","exceptions","are","caught","."]
docstr: The sandboxed environment will call this method to check if the
  attribute of an object is safe to access.  Per default all attributes
  starting with an underscore are considered private as well as the
  special attributes of internal python objects as returned by the
  :func:`is_internal_attribute` function.
docstr_tok: ["The","sandboxed","environment","will","call","this","method","to","check","if","the","attribute","of","an","object","is","safe","to","access",".","Per","default","all","attributes","starting","with","an","underscore","are","considered","private","as","well","as","the","special","attributes","of","internal","python","objects","as","returned","by","the",":","func",":","`","is_internal_attribute","`","function","."]
code: def is_safe_attribute(
      self, obj: t.Any, attr: str, value: t.Any
  ) -> bool:
      """The sandboxed environment will call this method to check if the
      attribute of an object is safe to access.  Per default all attributes
      starting with an underscore are considered private as well as the
      special attributes of internal python objects as returned by the
      :func:`is_internal_attribute` function.
      """
      return not (
          attr.startswith("_") or is_internal_attribute(obj, attr)
      )
  
imports: import operator
  import types
  import typing
  from _string import formatter_field_name_split
  from collections import abc
  from collections import deque
  from string import Formatter
  from markupsafe import EscapeFormatter
  from markupsafe import Markup
  from .environment import Environment
  from .exceptions import SecurityError
  from .runtime import Context
  from .runtime import Undefined
label_desc: Use image node_id 2 for calling the SandboxedEnvironment obj's underlying member method code with example usage: obj.is_safe_attribute(obj, attr, value) and returns: unknown