my_file.py
class Car:
    def __init__(self, ...):
        ...  

    def stop_car(self):
        self.speed = 0