Create a new pipe using the Revit Python Shell

Hi. I am posting here because Revit Api forum is currently on the maintenance. I need to create a pipe using the python script only. My code for Revit Python shell is:
from Autodesk.Revit.DB.Mechanical import *

a = XYZ(0,0,0)
b = XYZ(100,0,0)
levels = FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_Levels).WhereElementIsNotElementType().ToElements()
print(levels)
level = levels[1]
print(level)
system = Plumbing.PipeSystemType.DomesticColdWater.GetType
print(system)
pipetype = id(Plumbing.PipeType)
print(pipetype)
t = Transaction(doc, “pipe”)
t.Start()
Plumbing.Pipe.Create(doc, id(system), Plumbing.PipeType.Id, level.Id, a, b)
t.Commit()

When I run I am getting this:
Exception : Microsoft.Scripting.ArgumentTypeException: expected ElementId, got int

Does anybody know how to create a new element type (pipe type with the specific dimensions) and get its id?? Thank you!