When I execute the below code in visual studio code, I get the following error: 

"NameError: global name 'TestClass' is not defined"

I have checked previous posts + the python docs and it seems like my code SHOULD work.

```
import struct

def test():
    print "test"
    instance = TestClass("55555")

test()

class TestClass:
    def __init__(self, test):
        self.Text = test

    def ConvertLongToByteArr(self,longInput):
        returnBytes = bytearray(struct.pack(longInput))
        return returnBytes

    def Decrypt(self,input):
        print input

```