Using python for making rectangular pipe

I tried this script
import rhinoscriptsyntax as rs

Define the width and height of the pipe

width = float(y)
height = float(z)

Get the input curves

x = curve
curves = rs.GetObject(curve)

Create the pipes

pipes =
for curve in curves:
# Get the center point of the curve
center = rs.CurveAreaCentroid(curve)[0]

# Get the tangent vector of the curve at the center point
tangent = rs.CurveTangent(curve, rs.CurveClosestPoint(curve, center))

# Create the rectangle for the pipe
plane = rs.PlaneFromNormal(center, tangent)
rectangle = rs.AddRectangle(plane, width, height)

# Extrude the rectangle along the curve
pipe = rs.ExtrudeCurve(rectangle, curve)

# Add the pipe to the list
pipes.append(pipe)

Output the pipes

a = pipes

Output the pipes

a = pipes

but it is not working and I was wondering if anyone can help me debug it

I haven’t bothered with the centroid and tangent bit, but this:

import rhinoscriptsyntax as rs
import scriptcontext as sc
import Rhino

#Define the width and height of the pipe

width = float(y)
height = float(z)
#Get the input curves

#x = curve
#curves = rs.GetObject(curve)
#Create the pipes

sc.doc = Rhino.RhinoDoc.ActiveDoc

#pipes =
curves = rs.ObjectsByType(4)
pipes = []

for curve in curves:

    plane = rs.WorldYZPlane()
    
    rectangle = rs.AddRectangle(plane, width, height)
    print(rectangle)
    # Extrude the rectangle along the curve
    pipe = rs.ExtrudeCurve(rectangle, curve)
    
    # Add the pipe to the list
    pipes.append(pipe)

#Output the pipes
sc.doc = ghdoc
a = pipes

produces: