def METHOD_NAME(parts, part):
    if "memory-application" in part:
        memory_flash = part["memory-application"]
        if memory_flash:
            return memory_flash
    # look at the parent
    if "parent" in part:
        parent = _find_part_by_id(parts, part["parent"])
        if parent:
            return METHOD_NAME(parts, parent)
        print("no parent ", part["parent"], "found for", part["id"])
    return None