Syntax error while running a pyspark program

File “/home/ganesh07/pythondemo/retail/src/main/python/DailyRevenue.py”, line 21
from operator import add
^
SyntaxError: invalid syntax

while trying to run a program Get daily revenue per product - Run using spark-submit getting the above error can you please help me with this