What is anticipatory bail, and when can it be sought?

Anticipatory bail is a pre-arrest bail that can be applied for if a person anticipates being arrested for a non-bailable offense. It provides protection against arrest, allowing the person to avoid custody until the trial begins or the bail is canceled.