Apply suggestions from code review
Apply suggestions from code review

Co-authored-by: HammadTheOne <cbc0356d0fc05aff76e1c0563eb105e206df968c@users.noreply.github.com>
plotly/plotly.py,plotly/plotly.py,plotly/plotly.py