class_docstr: Fill in missing each missing row/column value by averaging across the
  k-nearest neighbors columns (taking into account missing data when
  computing column similarities and choosing which neighbors to inspect).
  
  Currently does not inherit from Solver since it expects sparse inputs in
  the form of nested dictionaries.
code: def fit_transform(self, X):
      X = check_array(X, force_all_finite=False)
  
      if self.verbose:
          print(
              (
                  "[SimilarityWeightedAveraging] Creating dictionary from matrix "
                  " with shape %s"
              )
              % (X.shape,)
          )
      missing_mask = np.isnan(X)
      observed_mask = ~missing_mask
      sparse_dict = matrix_to_nested_dictionary(
          X, filter_fn=np.isfinite
      )
  
      completed_dict = self.complete_dict(sparse_dict)
      array_result = np.zeros_like(X)
      for row_idx, row_dict in completed_dict.items():
          for col_idx, value in row_dict.items():
              array_result[row_idx, col_idx] = value
      array_result[observed_mask] = X[observed_mask]
      return array_result
  
file_path: fancyimpute/fancyimpute/similarity_weighted_averaging.py
imports: from collections import defaultdict
  from sklearn.utils import check_array
  import numpy
  from .dictionary_helpers import collect_nested_keys, reverse_lookup_from_nested_dict, matrix_to_nested_dictionary, transpose_nested_dictionary
label_desc: Use image node_id 4 for calling the SimilarityWeightedAveraging obj's underlying member method code with example usage: obj.fit_transform(X) and returns: array_result