code: def num_obs_dm(d):
      """
      Return the number of original observations that correspond to a
      square, redundant distance matrix.
  
      Parameters
      ----------
      d : ndarray
          The target distance matrix.
  
      Returns
      -------
      num_obs_dm : int
          The number of observations in the redundant distance matrix.
  
      """
      d = np.asarray(d, order="c")
      is_valid_dm(d, tol=np.inf, throw=True, name="d")
      return d.shape[0]
  
imports: from __future__ import division, print_function, absolute_import
  import warnings
  import numpy
  from functools import partial
  from collections import namedtuple
  from scipy._lib.six import callable, string_types
  from scipy._lib.six import xrange
  from scipy._lib._util import _asarray_validated
  from .None import _distance_wrap
  from .None import _hausdorff
  from ..linalg import norm
  from ..special import rel_entr
label_desc: Use image node_id 46 for calling a global function with example usage: num_obs_dm(d) and returns: d