An indictment is an accusation in writing, presented by a grand jury to a competent court, charging a person with a public offense.