code: def _contains_internal_dynamic_call(contract):
          
          for func in contract.all_functions_called:
              for node in func.nodes:
                  for ir in node.irs:
                      if isinstance(ir, (InternalDynamicCall)):
                          return True
          return False
docs: Checks if a contract contains a dynamic call either in a direct definition, or through inheritance.
  
          Returns:
              (boolean): True if this contract contains a dynamic call (including through inheritance).