code: def find_repeats(arr):
      """Find repeats in arr and return a tuple (repeats, repeat_count).
  
      The input is cast to float64. Masked values are discarded.
  
      Parameters
      ----------
      arr : sequence
          Input array. The array is flattened if it is not 1D.
  
      Returns
      -------
      repeats : ndarray
          Array of repeated values.
      counts : ndarray
          Array of counts.
  
      """
      # Make sure we get a copy. ma.compressed promises a "new array", but can
      # actually return a reference.
      compr = np.asarray(ma.compressed(arr), dtype=np.float64)
      try:
          need_copy = np.may_share_memory(compr, arr)
      except AttributeError:
          # numpy < 1.8.2 bug: np.may_share_memory([], []) raises,
          # while in numpy 1.8.2 and above it just (correctly) returns False.
          need_copy = False
      if need_copy:
          compr = compr.copy()
      return _find_repeats(compr)
  
imports: from __future__ import division, print_function, absolute_import
  import numpy
  from numpy import ndarray
  import numpy.ma
  from numpy.ma import masked, nomask
  from scipy._lib.six import iteritems
  import itertools
  import warnings
  from collections import namedtuple
  from .None import distributions
  import scipy.special
  from ._stats_mstats_common import _find_repeats, linregress, theilslopes, siegelslopes
label_desc: Use image node_id 5 for calling a global function with example usage: find_repeats(arr) and returns: _find_repeats