To complement the docstring, when you write it, it must be specified that "script" should be either a string or a file-like object.