code: def _coerce_resdef(data):
      if isinstance(data, dict):
          return data
      if isinstance(data, list):
          return {"sources": data}
      raise ResourceDefValueError()
  
imports: import collections
  import copy
  import logging
  import operator
  import pprint
  from guild import util
label_desc: Use image node_id 2 for calling a global function with example usage: _coerce_resdef(data) and returns: data, dict