Hello! I am trying to transpose a code from Quantopian to QuantConnect but face difficulties with the header

from QuantConnect.pipeline import Pipeline
from QuantConnect.algorithm import attach_pipeline, pipeline_output
from QuantConnect.pipeline.data.builtin import USEquityPricing
from QuantConnect.pipeline.data import morningstar
from QuantConnect.pipeline.factors import SimpleMovingAverage, AverageDollarVolume
from QuantConnect.pipeline.filters.morningstar import IsPrimaryShare


and the following instruction

    # Equities listed as common stock (as opposed to, say, preferred stock).
    # 'ST00000001' indicates common stock.
    common_stock = morningstar.share_class_reference.security_type.latest.eq('ST00000001')
Help is appreciated! Thank you.