class_docstr: Definition of evaluation policy.
class_docstr_tok: ["Definition","of","evaluation","policy","."]
code: def can_call(self, func):
      if self.allow_any_calls:
          return True
  
      if func in self.allowed_calls:
          return True
  
      owner_method = _unbind_method(func)
  
      if owner_method and owner_method in self.allowed_calls:
          return True
  
imports: from inspect import signature, Signature
  from typing import Any, Callable, Dict, Set, Sequence, Tuple, NamedTuple, Type, Literal, Union, TYPE_CHECKING
  import ast
  import builtins
  import collections
  import operator
  import sys
  from functools import cached_property
  from dataclasses import dataclass, field
  from types import MethodDescriptorType, ModuleType
  from IPython.utils.docs import GENERATING_DOCUMENTATION
  from IPython.utils.decorators import undoc
label_desc: Use image node_id 4 for calling the EvaluationPolicy obj's underlying member method code with example usage: obj.can_call(func) and returns: True, True, True