code: def get_enrollment(self, uuid, item_date):
          
          # item_date must be offset-naive (utc)
          if item_date and item_date.tzinfo:
              item_date = (item_date - item_date.utcoffset()).replace(tzinfo=None)
  
          enrollments = self.get_enrollments(uuid)
          enroll = self.unaffiliated_group
          if enrollments:
              for enrollment in enrollments:
                  if not item_date:
                      enroll = enrollment.organization.name
                      break
                  elif item_date >= enrollment.start and item_date <= enrollment.end:
                      enroll = enrollment.organization.name
                      break
          return enroll
docs: Get the enrollment for the uuid when the item was done