code: def get_attr(obj: object, name: str):
      """Get the attribute of an object.
  
      Examples
      --------
      >>> from deepchem.utils.attribute_utils import get_attr
      >>> class MyClass:
      ...     def __init__(self):
      ...         self.a = 1
      ...         self.b = 2
      >>> obj = MyClass()
      >>> get_attr(obj, "a")
      1
  
      Parameters
      ----------
      obj : object
          The object to get the attribute from.
      name : str
          The name of the attribute.
      Returns
      -------
      val : object
          The value of the attribute.
  
      """
      return _get_attr(obj, _preproc_name(name))
  
file_path: deepchem/deepchem/utils/attribute_utils.py
imports: import re
  import ast
  from typing import Callable, Any
label_desc: Use image node_id 1 for calling a global function with example usage: get_attr(obj, name) and returns: _get_attr