getDependenciesByPath(path) {
      const result = [];
      this.dependencies.forEach((deps, variable) => {
        if (variable === path || path.startsWith(variable + ".")) {
          result.push(...deps);
        }
      });
      return result;
    }
Cleans up the instance by clearing dependencies and resetting conditional groups.

This method should be called to release resources and avoid memory leaks when
the instance of the class is no longer required.