def parse_workpackages(workpackages):
    """Parses read workpackages into a structured dictionary element.

    Shapes work packages into a standard structure to use in the event creation
    There might be ignored information. Minimum working example only needs
    title, date, and time. If there happens any error during parsing,
    that work package will be added to the `err` list.
    Only the following parameters will be parsed to create an event, the rest
    is discarded: ID, subject, description, parental relation, assignee,
    last update date, due date, and "dueHour". "dueHour" parameter should be
    located at the end of the description in the form of "dueHour=HH:MM:SS"
    where H is hour, M is minute, and S is second. If the task starts with three
    exclamations (!) marks, it will not be synchronized.

    Args:
        workpackages: all workpackages returned from read_workpackages() func.

    Returns:
        parsed_wps: a dictionary of structured workpackages. Key is wp ID.
        err: a list of could not structured workpackages with Exception info
    """
    parsed_wps = {}
    err = []
    for elem in workpackages['_embedded']['elements']:
        # If description returns None, it will not be synfchronized
        # Packages starting with "!!!" line will not be synchronized
        if elem['description']['raw'] is None or \
            elem['description']['raw'].split('\n')[0] == '!!!':
            pass # Do not synchronize this package to Calendar
        else:
            try:
                tmp = {}
                tmp['wp_id'] = elem['id']  # Read work package ID
                tmp['subject'] = elem['subject'].strip()  # Read work package subject
                tmp['description'] = elem['description']['html']  # Save description

                if elem['_links']['parent']['href']:  # If there is a parent
                    tmp['parent'] = elem['_links']['parent']['href'].split('/')[-1] \
                        + ":" + elem['_links']['parent']['title']
                else:
                    tmp['parent'] = "No parent"

                if elem['_links']['assignee']['href']:  # There might not be an assignee
                    tmp['assignee'] = elem['_links']['assignee']['title'] # if there is
                else:
                    tmp['assignee'] = 'Not assigned to anyone'  # if there is not

                if elem['dueDate']:  # Assumes due hour is specified
                    tmp['due_date'] = elem['dueDate']  # if specified
                    tmp['due_hour'] = elem['description']['raw'].split('\n')[-1].split('=')[-1].strip()
                else:  # dueHour has no effect on time even if it is specified
                    tmp['due_date'] = elem['createdAt'].split('T')[0]  # create date
                    tmp['due_hour'] = elem['createdAt'].split('T')[-1][:-1]  # create time

                tmp['updated_at'] = elem['updatedAt']
                parsed_wps[elem['id']] = tmp
            except Exception as error:
                err.append([elem, error])

    return parsed_wps, err