def METHOD_NAME(self, path, content='xxx'):
    """Writes a file in the given path.
    path can be a string or a sequence.
    """
    if isinstance(path, (list, tuple)):
        path = os.path.join(*path)
    f = open(path, 'w')
    try:
        f.write(content)
    finally:
        f.close()