if dt is an instance of a drivetrain, then dt.turnFor will use the gyro if you have configured it that way (in which case it would be an instance of a smartdrive). If you configured without a gyro then it will use the motor encoders (and the wheel circumference etc.) to do the turn.
The turn we do with the gyro is a little more complex than just
while(Gyro.angle() >-160.5)
{
dt.turn(turnType::left, 40, velocityUnits::pct);
}
It will slow the drivetrain as it nears the target and also correct for any overshoot. However, it does not use a PID algorithm, we had to leave room for students to improve upon what we provide.