def METHOD_NAME(
    self,
    layer_id: int,
    mode: LayerMode = None,
    position: int = None,
    time_per_frame: float = None,
    replay_delay: float = None
) -> None:
    """
    Define a layer for the rendered sprite.
    :param layer_id: Layer identifier.
    :type layer_id: int
    :param mode: Animation mode (off, once, loop).
    :type mode: LayerMode
    :param position: Layer position.
    :type position: int
    :param time_per_frame: Time spent on each frame.
    :type time_per_frame: float
    :param replay_delay: Time delay before replaying the animation.
    :type replay_delay: float
    """
    self.layers[layer_id] = {
        "layer_id": layer_id,
        "mode": mode,
        "position": position,
        "time_per_frame": time_per_frame,
        "replay_delay": replay_delay,
    }