code: def _infer_decorator_callchain(node):
      
      if not isinstance(node, FunctionDef):
          return None
      if not node.parent:
          return None
      try:
          result = next(node.infer_call_result(node.parent))
      except exceptions.InferenceError:
          return None
      if isinstance(result, bases.Instance):
          result = result._proxied
      if isinstance(result, ClassDef):
          if result.is_subtype_of("%s.classmethod" % BUILTINS):
              return "classmethod"
          if result.is_subtype_of("%s.staticmethod" % BUILTINS):
              return "staticmethod"
      return None
docs: Detect decorator call chaining and see if the end result is a
      static or a classmethod.