code: def _applyfcn(
      obj: object,
      name: str,
      attrfcn: Callable,
      dictfcn: Callable,
      listfcn: Callable,
  ):
      """Apply the function to the attribute of an object.
  
      Parameters
      ----------
      obj : object
          Object to apply the function to.
      name : str
          Name of the attribute.
      attrfcn : Callable
          Function to get the attribute.
      dictfcn : Callable
          Function to get the dictionary.
      listfcn : Callable
          Function to get the list.
  
      Returns
      -------
      val : object
          The value of the attribute.
  
      """
      if name[0] == "[":
          key = ast.literal_eval(name[1:-1])
          if isinstance(obj, dict):
              return dictfcn(obj, key)
          elif isinstance(obj, list):
              return listfcn(obj, key)
          else:
              msg = "The parameter with [] must be either a dictionary or a list. "
              msg += "Got type: %s" % type(obj)
              raise TypeError(msg)
      else:
          return attrfcn(obj, 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 9 for calling a global function with example usage: _applyfcn(obj, name, attrfcn, dictfcn, listfcn) and returns: attrfcn, dictfcn, listfcn