def METHOD_NAME(primary_type: str, types, results=None):
    if results is None:
        results = []
    primary_type = re.split(r"\W", primary_type)[0]
    if primary_type in results or not types.get(primary_type):
        return results
    results.append(primary_type)
    for field in types[primary_type]:
        deps = METHOD_NAME(field["type"], types, results)
        for dep in deps:
            if dep not in results:
                results.append(dep)
    return results