code: def extract_feature_(self, persistence_diagram):
      feature = np.zeros(int(np.max(persistence_diagram[:, 2])) + 1)
      max_lifetimes = np.zeros(
          int(np.max(persistence_diagram[:, 2])) + 1
      )
  
      for hole in persistence_diagram:
          lifetime = hole[1] - hole[0]
          if lifetime > max_lifetimes[int(hole[2])]:
              max_lifetimes[int(hole[2])] = lifetime
  
      for hole in persistence_diagram:
          index = int(hole[2])
          lifetime = hole[1] - hole[0]
          if np.equal(lifetime, self.ratio_ * max_lifetimes[index]):
              feature[index] += 1.0
  
      return feature
  
imports: from abc import ABC
  import numpy
  import pandas
  from gtda.diagrams import Scaler, Filtering, PersistenceEntropy, PersistenceLandscape, BettiCurve
  from gtda.homology import VietorisRipsPersistence
label_desc: Use image node_id 2 for calling the RelevantHolesNumber obj's underlying member method code with example usage: obj.extract_feature_(persistence_diagram) and returns: feature