code: def _parse_target_attributes_of_pool_name(attr_str, targets):
      if not targets or attr_str is None:
          return {}
  
      target_attributes = {}
      for pool_values in attr_str:
          pool_name, target_name, target_value = re.split(
              ":", pool_values
          )
          if pool_name not in target_attributes:
              target_attributes[pool_name] = {}
  
          matched_targets = [
              target
              for target in targets
              if target_name == target.kind.name
          ]
          if matched_targets:
              target_attributes[pool_name][
                  matched_targets[0]
              ] = target_value
          else:
              raise TVMCException(
                  "The workspace pool target specification "
                  "needs to contain a subset of the same TVM "
                  "targets as when specifying targets to use."
              )
      return target_attributes
  
file_path: tvm/python/tvm/driver/tvmc/workspace_pools.py
imports: import logging
  import re
  from tvm.driver.tvmc import TVMCException
  from tvm.target import Target
  from tvm.ir.memory_pools import PoolInfoProperties, WorkspaceMemoryPools, WorkspacePoolInfo
label_desc: Use image node_id 5 for calling a global function with example usage: _parse_target_attributes_of_pool_name(attr_str, targets) and returns: target_attributes, dict