code: def __init__(self, url, dag, is_containerized):
      if " " in url:
          raise WorkflowError(
              "Invalid singularity image URL containing whitespace."
          )
  
      self.singularity = Singularity()
  
      self.url = url
      self._img_dir = dag.workflow.persistence.container_img_path
      self.is_containerized = is_containerized
  
imports: from pathlib import Path
  import subprocess
  import shutil
  import os
  import hashlib
  from snakemake.common import get_snakemake_searchpaths, is_local_file, parse_uri
  from snakemake.exceptions import WorkflowError
  from snakemake.logging import logger
  from snakemake_interface_common.utils import lazy_property
label_desc: Use image node_id 1 to create a new Image object  with example: obj = Image(url, dag, is_containerized)