Rewrite the following python code so that it can be run as a script.
def my_function():
    print("Hello, World!")

if __name__ == '__main__':
    my_function()
def my_function():
    print("Hello, World!")

if __name__ == '__main__':
    my_function()

if __name__ == '__main__':
    my_function()