def METHOD_NAME(block):
    """
    Recursively strips 'filename' from all children's definitions.
    """
    print(f"strip filename from {str(block.location)}")
    if block._field_data.has(block, 'filename'):  # lint-amnesty, pylint: disable=protected-access
        block._field_data.delete(block, 'filename')  # lint-amnesty, pylint: disable=protected-access
    if hasattr(block, 'xml_attributes'):
        if 'filename' in block.xml_attributes:
            del block.xml_attributes['filename']
    for child in block.get_children():
        METHOD_NAME(child)
    block.save()