def extract_name(in_line: str) -> str:
    """
    Extracts the name from the type construct. Information that is not needed will be removed
    such as the stereotype.
    """
    types = {'package', 'class', 'abstract', 'interface',
             'enum', 'abstract class', 'entity'}
    process_type: str = ''
    for item_type in types:
        if in_line.startswith(item_type):
            process_type = item_type
            break

    process_line = in_line.replace(' ', '')
    if '<<' in process_line:
        process_line = process_line.split('<<')[0]
    process_line = process_line.replace(process_type, '')
    found_name = process_line.split('{')[0]
    return found_name