code: def _init_item_marks(item_marks):
          
          if isinstance(item_marks, dict):
              return item_marks
          if item_marks:
              return {item_id:'>' for item_id in item_marks}
docs: Initialize the makred item dict.