How do you Identify Support and Resitance levels within price data? and how do you use it as condition for trading in python.

Example:

if current_price == support_level:

    do something...

i appreciate any and all the help i can get.