code: def build_p2p_daemon():
      result = subprocess.run(
          "go version", capture_output=True, shell=True
      ).stdout.decode("ascii", "replace")
      m = re.search(r"^go version go([\d.]+)", result)
  
      if m is None:
          raise FileNotFoundError("Could not find golang installation")
      version = parse_version(m.group(1))
      if version < parse_version("1.13"):
          raise EnvironmentError(
              f"Newer version of go required: must be >= 1.13, found {version}"
          )
  
      with tempfile.TemporaryDirectory() as tempdir:
          dest = os.path.join(tempdir, "libp2p-daemon.tar.gz")
          urllib.request.urlretrieve(P2PD_SOURCE_URL, dest)
  
          with tarfile.open(dest, "r:gz") as tar:
              tar.extractall(tempdir)
  
          result = subprocess.run(
              [
                  "go",
                  "build",
                  "-o",
                  os.path.join(
                      here, "hivemind", "hivemind_cli", "p2pd"
                  ),
              ],
              cwd=os.path.join(
                  tempdir,
                  f"go-libp2p-daemon-{P2PD_VERSION.lstrip('v')}",
                  "p2pd",
              ),
          )
          if result.returncode != 0:
              raise RuntimeError(
                  f"Failed to build p2pd: exited with status code: {result.returncode}"
              )
  
imports: import codecs
  import glob
  import hashlib
  import os
  import platform
  import re
  import subprocess
  import tarfile
  import tempfile
  import urllib.request
  from pkg_resources import parse_requirements, parse_version
  from setuptools import find_packages, setup
  from setuptools.command.build_py import build_py
  from setuptools.command.develop import develop
label_desc: Use image node_id 3 for calling a global function with example usage: build_p2p_daemon() without return types