code: def multiplicity(keys, axis=semantics.axis_default):
      
      index = as_index(keys, axis)
      return index.count[index.inverse]
docs: return the multiplicity of each key, or how often it occurs in the set
  
      Parameters
      ----------
      keys : indexable object
  
      Returns
      -------
      ndarray, [keys.size], int
          the number of times each input item occurs in the set