code: def _find_addons_dir():
      
      res = set()
      for odoo_version_info in ODOO_VERSION_INFO.values():
          addons_ns = odoo_version_info['addons_ns']
          addons_dir = os.path.join(*addons_ns.split('.'))
          if os.path.isdir(addons_dir):
              if not odoo_version_info['namespace_packages'] or \
                      os.path.isfile(os.path.join(addons_dir, '__init__.py')):
                  res.add((addons_dir, addons_ns))
      if len(res) == 0:
          raise RuntimeError("No addons namespace found.")
      if len(res) > 1:
          raise RuntimeError("More than one addons namespace found.")
      return res.pop()
docs: Try to find the addons dir / namespace package
  
      Returns addons_dir, addons_ns