<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def create_items(self, session_items):
 """Instantiate cart items from session data. The value returned by this method is used to populate the cart's `items` attribute. Parameters session_items : dict A dictionary of pk-quantity mappings (each pk is a string). For example: ``{'1': 5, '3': 2}``. Returns ------- dict A map between the `session_items` keys and instances of :attr:`item_class`. For example:: {'1': <CartItem: obj=foo, quantity=5>, '3': <CartItem: obj=bar, quantity=2>} """

        pks = list(session_items.keys())
        items = {}
        item_class = self.item_class
        process_object = self.process_object
        for obj in self.get_queryset(pks):
            pk = str(obj.pk)
            obj = process_object(obj)
            items[pk] = item_class(obj, **session_items[pk])
        if len(items) < len(session_items):
            self._stale_pks = set(session_items).difference(items)
        return items