<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def boolean_automatic(meshes, operation):
 """ Automatically pick an engine for booleans based on availability. Parameters meshes : list of Trimesh Meshes to be booleaned operation : str Type of boolean, i.e. 'union', 'intersection', 'difference' Returns result : trimesh.Trimesh Result of boolean operation """

    if interfaces.blender.exists:
        result = interfaces.blender.boolean(meshes, operation)
    elif interfaces.scad.exists:
        result = interfaces.scad.boolean(meshes, operation)
    else:
        raise ValueError('No backends available for boolean operations!')
    return result