def METHOD_NAME(self, sprite_num):
    if not os.access(self.fname, os.R_OK):
        raise generic.ScriptError("Sound file '{}' does not exist.".format(self.fname), self.pos)
    size = os.path.getsize(self.fname)
    if size == 0:
        raise generic.ScriptError(
            "Expected sound file '{}' to have a non-zero length.".format(self.fname), self.pos
        )