An accomplice is any person who, either as a principal or as an accessory, has been associated with another person in the commission of any offence.