code: def workflow_property_to_arg(
      self,
      property,
      flag=None,
      quote=True,
      skip=False,
      invert=False,
      attr=None,
  ):
      if skip:
          return ""
  
      # Get the value of the property. If property is nested, follow the hierarchy until
      # reaching the final value.
      query = property.split(".")
      base = self.workflow
      for prop in query[:-1]:
          base = getattr(base, prop)
      value = getattr(base, query[-1])
  
      if value is not None and attr is not None:
          value = getattr(value, attr)
  
      if flag is None:
          flag = f"--{query[-1].replace('_', '-')}"
  
      if invert and isinstance(value, bool):
          value = not value
  
      return format_cli_arg(flag, value, quote=quote)
  
imports: from dataclasses import dataclass, fields
  import hashlib
  import os
  import sys
  from typing import Mapping, TypeVar, TYPE_CHECKING, Any
  from snakemake_interface_executor_plugins.utils import format_cli_arg, join_cli_args
  from snakemake_interface_storage_plugins.registry import StoragePluginRegistry
  from snakemake import common
  from snakemake.settings import SharedFSUsage
label_desc: Use image node_id 9 for calling the SpawnedJobArgsFactory obj's underlying member method code with example usage: obj.workflow_property_to_arg(property, flag, quote, skip, invert, attr) and returns: format_cli_arg, str