code: def parse_flag_from_env(key, default=False):
      try:
          value = os.environ[key]
      except KeyError:
          # KEY isn't set, default to `default`.
          _value = default
      else:
          # KEY is set, convert it to True or False.
          try:
              _value = strtobool(value)
          except ValueError:
              # More values are supported, but let's keep the message simple.
              raise ValueError(f"If set, {key} must be yes or no.")
      return _value
  
imports: import asyncio
  import importlib.metadata
  import os
  import re
  import sys
  import tempfile
  import unittest
  from contextlib import contextmanager
  from copy import deepcopy
  from distutils.util import strtobool
  from enum import Enum
  from importlib.util import find_spec
  from pathlib import Path
  from unittest.mock import patch
  import pyarrow
  import pytest
  import requests
  from packaging import version
  from datasets import config
label_desc: Use image node_id 1 for calling a global function with example usage: parse_flag_from_env(key, default) and returns: _value