Hello everyone,
I am trying to run the Feature Outline Masks tool from ArcGIS Pro in FME using the PythonCaller transformer. I am new to Python and would greatly appreciate your assistance.

I copied the script from the ArcGIS Pro tools website (as shown below) and made modifications to fit my data:
# Import system modules
import arcpy
# Set environment settings
arcpy.env.workspace = "C:/data"
# Set local variables
input_layer = "roads.lyrx"
output_fc = "cartography.gdb/transportation/roads_fom_polys"
reference_scale = "25000"
spatial_reference = arcpy.SpatialReference(4326)
margin = "5 meters"
method = "EXACT_SIMPLIFIED"
mask_for_non_placed_anno = "ONLY_PLACED"
attributes = "ALL"
# Execute Feature Outline Masks
arcpy.FeatureOutlineMasks_cartography(input_layer,
output_fc,
reference_scale,
spatial_reference,
margin, method,
mask_for_non_placed_anno,
attributes)
Source: https://pro.arcgis.com/en/pro-app/3.3/tool-reference/cartography/feature-outline-masks.htm
I modified the script in PythonCaller to fit my data, but when I run it, I encounter the following error:


Python Exception <NameError>: name 'input_layer' is not defined
If anyone has experience using PythonCaller in FME for ArcGIS Pro tools or has suggestions on how to fix this issue, I would be very grateful for your guidance.
Thank you so much for your help!