code: def test_issue_1331():
      import copy
  
      from river import anomaly
  
      lof = anomaly.LocalOutlierFactor()
  
      X = [{"a": 1, "b": 1}, {"a": 1, "b": 1}]
      for x in X:
          lof.learn_one(x)
  
      neighborhoods_ = lof.neighborhoods.copy()
      rev_neighborhoods = lof.rev_neighborhoods.copy()
      k_dist_ = lof.k_dist.copy()
      reach_dist_ = copy.deepcopy(lof.reach_dist)
      dist_dict_ = copy.deepcopy(lof.dist_dict)
      local_reach_ = lof.local_reach.copy()
      lof_ = lof.lof.copy()
  
      lof.score_one({"a": 0.5, "b": 1})
  
      assert neighborhoods_ == lof.neighborhoods
      assert rev_neighborhoods == lof.rev_neighborhoods
      assert k_dist_ == lof.k_dist
      assert reach_dist_ == lof.reach_dist
      assert dist_dict_ == lof.dist_dict
      assert local_reach_ == lof.local_reach
      assert lof_ == lof.lof
  
file_path: river/river/anomaly/test_lof.py
imports: from __future__ import annotations
  import numpy
  import pandas
  from sklearn import neighbors
  from river import anomaly, datasets
label_desc: Use image node_id 4 for calling a global function with example usage: test_issue_1331() without return types