Use case:
I have a method doSomething(file) which accepts the file object and does something, I can't alter this method.
Now, to have the file to pass to doSomething, i need to open it through open() method but i don't have that file to store on localhost and i am allowed to but i have the file contents and file name stored in python variables. Is there a way to get file object from these two variables ?