The doc currently shows:
statcast_pitcher(start_dt=[yesterday's date], end_dt=None, player_id)
When the doc should show the correct function being described:
statcast_pitcher_spin(start_dt=[yesterday's date], end_dt=None, player_id)
This function name matches the example.
from pybaseball import statcast_pitcher_spin