docstr: Ensure stdlib distutils when running under pip.
  See pypa/pip#8761 for rationale.
docstr_tok: ["Ensure","stdlib","distutils","when","running","under","pip",".","See","pypa\/pip","#","8761","for","rationale","."]
code: def spec_for_pip(self):
      """
      Ensure stdlib distutils when running under pip.
      See pypa/pip#8761 for rationale.
      """
      if (
          sys.version_info >= (3, 12)
          or self.pip_imported_during_build()
      ):
          return
      clear_distutils()
      self.spec_for_distutils = lambda: None
  
imports: import sys
  import os
label_desc: Use image node_id 4 for calling the DistutilsMetaFinder obj's underlying member method code with example usage: obj.spec_for_pip() without return types