nodes: 0, module; 1, function_definition; 2, function_name:delay_or_run; 3, parameters; 4, block; 5, identifier:self; 6, list_splat_pattern; 7, dictionary_splat_pattern; 8, expression_statement; 9, expression_statement; 10, expression_statement; 11, try_statement; 12, return_statement; 13, identifier:args; 14, identifier:kwargs; 15, comment:"""
          Attempt to call self.delay, or if that fails, call self.run.
  
          Returns a tuple, (result, required_fallback). ``result`` is the result
          of calling delay or run. ``required_fallback`` is True if the broker
          failed we had to resort to `self.run`.
          """; 16, call; 17, assignment; 18, block; 19, except_clause; 20, expression_list; 21, attribute; 22, argument_list; 23, identifier:possible_broker_errors; 24, call; 25, expression_statement; 26, expression_statement; 27, identifier:possible_broker_errors; 28, block; 29, identifier:result; 30, identifier:required_fallback; 31, identifier:warnings; 32, identifier:warn; 33, string:"delay_or_run is deprecated. Please use delay_or_eager"; 34, identifier:DeprecationWarning; 35, attribute; 36, argument_list; 37, assignment; 38, assignment; 39, expression_statement; 40, expression_statement; 41, identifier:self; 42, identifier:_get_possible_broker_errors_tuple; 43, identifier:result; 44, call; 45, identifier:required_fallback; 46, False; 47, assignment; 48, assignment; 49, attribute; 50, argument_list; 51, identifier:result; 52, call; 53, identifier:required_fallback; 54, True; 55, identifier:self; 56, identifier:apply_async; 57, keyword_argument; 58, keyword_argument; 59, attribute; 60, argument_list; 61, identifier:args; 62, identifier:args; 63, identifier:kwargs; 64, identifier:kwargs; 65, call; 66, identifier:run; 67, list_splat; 68, dictionary_splat; 69, identifier:self; 70, argument_list; 71, identifier:args; 72, identifier:kwargs
code: def delay_or_run(self, *args, **kwargs):
          """
          Attempt to call self.delay, or if that fails, call self.run.
  
          Returns a tuple, (result, required_fallback). ``result`` is the result
          of calling delay or run. ``required_fallback`` is True if the broker
          failed we had to resort to `self.run`.
          """
          warnings.warn(
              "delay_or_run is deprecated. Please use delay_or_eager",
              DeprecationWarning,
          )
          possible_broker_errors = self._get_possible_broker_errors_tuple()
          try:
              result = self.apply_async(args=args, kwargs=kwargs)
              required_fallback = False
          except possible_broker_errors:
              result = self().run(*args, **kwargs)
              required_fallback = True
          return result, required_fallback