docs: def get_dependencies_from_decl(decl, recursive=True):
      """
      Returns the list of all types and declarations the declaration depends on.
  
      """
      result = []
      if isinstance(decl, typedef.typedef_t) or \
              isinstance(decl, variable.variable_t):
          return [dependency_info_t(decl, decl.decl_type)]
      if isinstance(decl, namespace.namespace_t):
          if recursive:
              for d in decl.declarations:
                  result.extend(get_dependencies_from_decl(d))
          return result
      if isinstance(decl, calldef.calldef_t):
          if decl.return_type:
              result.append(
                  dependency_info_t(decl, decl.return_type, hint="return type"))
          for arg in decl.arguments:
              result.append(dependency_info_t(decl, arg.decl_type))
          for exc in decl.exceptions:
              result.append(dependency_info_t(decl, exc, hint="exception"))
          return result
      if isinstance(decl, class_declaration.class_t):
          for base in decl.bases:
              result.append(
                  dependency_info_t(
                      decl,
                      base.related_class,
                      base.access_type,
                      "base class"))
          if recursive:
              for access_type in class_declaration.ACCESS_TYPES.ALL:
                  result.extend(
                      __find_out_member_dependencies(
                          decl.get_members(access_type), access_type))
          return result
      return result