code: def detect_conda_env_name():
      # This only works for anaconda3
      import subprocess
  
      pro = subprocess.Popen(
          "conda info",
          shell=True,
          stdout=subprocess.PIPE,
          stderr=subprocess.PIPE,
      )
      out, err = pro.communicate()
      out = out.decode("utf-8")
      err = err.decode("utf-8")
      errorcode = pro.returncode
      if 0 != errorcode:
          raise EnvironmentError(
              err
              + "Cannot find conda info. Please verify your conda installation"
          )
      for line in out.split("\n"):
          item = line.split(":")
          if len(item) == 2:
              if item[0].strip() == "active environment":
                  return item[1].strip()
      # For anaconda2 or if any error occurs above
      python_location = detect_python_location()
      if "envs" in python_location:
          return python_location.split("/")[-3]
      raise EnvironmentError(
          err
          + "Failed to detect the current conda environment. Please verify"
          "your conda installation and activate the env you want to use"
      )
  
file_path: analytics-zoo/pyzoo/zoo/util/utils.py
imports: import glob
  from zoo.common import Sample
  import numpy
  from pyspark.ml.linalg import DenseVector, SparseVector, VectorUDT
label_desc: Use image node_id 4 for calling a global function with example usage: detect_conda_env_name() and returns: python_location, item