def METHOD_NAME(old_port) -> dict[str, Any]:
    _type = old_port["type"]
    if _type in ("number", "integer", "string"):
        # creates schema from old data
        title = old_port["label"].upper()
        field_kwargs = {"description": old_port["description"]}
        if unit := old_port.get("unit"):
            field_kwargs["x_unit"] = unit
        python_type = {"number": float, "integer": int, "string": str}
        schema = create_model(
            title, __root__=(python_type[_type], Field(..., **field_kwargs))
        ).schema_json(indent=1)
        return create_port_data(schema)
    return old_port