code: def _get_compute_cap(device):
      caps_str = device.physical_device_desc
      m = re.search("compute capability: (\\d+).(\\d+)", caps_str)
      major = m.group(1)
      minor = m.group(2)
      return (major, minor)
  
file_path: insightface/reconstruction/ostec/external/stylegan2/dnnlib/tflib/custom_ops.py
imports: import os
  import re
  import uuid
  import hashlib
  import tempfile
  import shutil
  import tensorflow
  from tensorflow.python.client import device_lib
label_desc: Use image node_id 2 for calling a global function with example usage: _get_compute_cap(device) and returns: major,  minor