def METHOD_NAME(self) -> ExpressionScalar:
    """An expression for the duration of this PulseTemplate."""
    if isinstance(self._duration, ExpressionScalar):
        return self._duration
    else:
        return ExpressionScalar(self._duration)