def METHOD_NAME(
    sound: Sound,
    volume: float = 1.0,
    pan: float = 0.0,
    looping: bool = False,
    speed: float = 1.0,
) -> Optional[media.Player]:
    """
    Play a sound.
    :param sound: Sound loaded by :func:`load_sound`. Do NOT use a string here for the filename.
    :param volume: Volume, from 0=quiet to 1=loud
    :param pan: Pan, from -1=left to 0=centered to 1=right
    :param looping: Should we loop the sound over and over?
    :param speed: Change the speed of the sound which also changes pitch, default 1.0
    """
    if sound is None:
        print("Unable to play sound, no data passed in.")
        return None
    elif isinstance(sound, str):
        msg = (
            "Error, passed in a string as a sound. "
            "Make sure to use load_sound first, and use that result in play_sound."
        )
        raise Exception(msg)
    try:
        return sound.play(volume, pan, looping, speed)
    except Exception as ex:
        print("Error playing sound.", ex)
        return None