code: def download_p2p_daemon():
      binary_path = os.path.join(
          here, "hivemind", "hivemind_cli", "p2pd"
      )
      arch = platform.machine()
      # An architecture name may vary depending on the OS (e.g., the same CPU is arm64 on macOS and aarch64 on Linux).
      # We consider multiple aliases here, see https://stackoverflow.com/questions/45125516/possible-values-for-uname-m
      if arch in ("x86_64", "x64"):
          arch = "amd64"
      if arch in ("aarch64", "aarch64_be", "armv8b", "armv8l"):
          arch = "arm64"
      binary_name = f"p2pd-{platform.system().lower()}-{arch}"
  
      if binary_name not in P2P_BINARY_HASH:
          raise RuntimeError(
              f"hivemind does not provide a precompiled p2pd binary for {platform.system()} ({arch}). "
              f"Please install Go and build it from source: https://github.com/learning-at-home/hivemind#from-source"
          )
      expected_hash = P2P_BINARY_HASH[binary_name]
  
      if sha256(binary_path) != expected_hash:
          binary_url = os.path.join(P2PD_BINARY_URL, binary_name)
          print(f"Downloading {binary_url}")
  
          urllib.request.urlretrieve(binary_url, binary_path)
          os.chmod(binary_path, 0o777)
  
          actual_hash = sha256(binary_path)
          if actual_hash != expected_hash:
              raise RuntimeError(
                  f"The sha256 checksum for p2pd does not match (expected: {expected_hash}, actual: {actual_hash})"
              )
  
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 4 for calling a global function with example usage: download_p2p_daemon() without return types