def METHOD_NAME(type_str, hfile, parsed_type=Struct):
    """Composite type may be struct or union (even typedefed with typedef
    keyword).
    Returns Struct or Union object.
    """
    names_and_members = re.search(
        r'^(?:typedef\s+)?(?:struct|union)([\w\s]*?)\{(.*)\}([\w\s\*,]*);',
        type_str
    )
    if names_and_members is None:
        return parsed_type('', '', [], hfile)
    name = names_and_members.group(1).strip()
    if type_str.startswith('typedef'):
        typedef_name = names_and_members.group(3).strip()
    else:
        typedef_name = ''
    members_str = names_and_members.group(2)
    members = split_members(members_str)
    parsed_members = []
    for m in members:
        one_member = Param('', m)
        parsed_members.append(one_member)
        edit_structured_param_type(one_member, parsed_members, hfile)
    return parsed_type(name, typedef_name, parsed_members, hfile)