[smart] optimize specialize step
PEP8