code: def _inplace_paired_L2(A, B):
      """Equivalent to ((A-B)**2).sum(axis=-1), but modifies A in place."""
      A -= B
      return np.einsum("...ij,...ij->...i", A, A)
  
file_path: metric-learn/metric_learn/lmnn.py
imports: import numpy
  from collections import Counter
  from sklearn.metrics import euclidean_distances
  from sklearn.base import TransformerMixin
  import warnings
  from ._util import _initialize_components, _check_n_components
  from .base_metric import MahalanobisMixin
label_desc: Use image node_id 1 for calling a global function with example usage: _inplace_paired_L2(A, B) and returns: np