code: def user_owns_file(path, uid=None):
      
      if uid is None:
          uid = os.getuid()
      path = os.path.expandvars(os.path.expanduser(path))
      return os.stat(path).st_uid == uid
docs: Returns whether a file located at *path* is owned by the user with *uid*. When *uid* is *None*,
      the user id of the current process is used.