Different ways to call an imported function from a separate py file, returns error Not sure if this is a normal python behaviour or a Blender thing

I have a file named operators.py and a file named functions.py.
also a __innit__.py that calls the operators.

Method 1 :

in functions.py:

def someFunction(self, context):
    print("I did it!")


in operators.py:

from functions import someFunction


and then later I call the function with:

someFunction(self, context)


The above resulted in:

ImportError: cannot import name 'someFunction'


Method 2 :

in functions.py:

def someFunction(self, context):
    print("I did it!")


in operators.py:

import functions


and then later I call the function with:

functions.someFunction(self, context)


The above resulted in:

AttributeError: module 'functions' has no attribute 'someFunction'


So blender did get and import the module but it can't get the functions working.
Your function seems to be in a class (guessed from the self parameter).

Method using self are meant to be used on instances.

You should either instanciate the class it belongs to in order to have an instance on which to call the method, or make the function static, or make the function a module function (out of a class definition).

Also the package init file should be named __init__.py, not __innit__.py.