I know that the parameters can be any object but for the documentation it is quite important to specify what you would expect.
First is how to specify a parameter ty
If using Python 3, you can use the function annotations described in PEP 3107.
def compile( source: "something compilable", filename: "where the compilable thing comes from", mode: "is this a single statement or a suite?"):
See also function definitions.