code: def _add_if_obj_has_property(
      obj: Any, property_name: str, n_spaces, res: List[str]
  ):
      if not hasattr(obj, property_name):
          return
      value = getattr(obj, property_name)
      if value is None:
          return
      res.append(" " * n_spaces + f"{property_name}={value}")
  
imports: import logging
  import math
  from dataclasses import dataclass
  from enum import Enum
  from typing import Any, Sequence, Callable, Optional, List
  import numpy
  from pipeline_dp import input_validators
label_desc: Use image node_id 6 for calling a global function with example usage: _add_if_obj_has_property(obj, property_name, n_spaces, res) without return types