A custodial sentence is a judicial sentence, imposing a punishment consisting of mandatory custody of the convict, either in prison or in some other closed therapeutic or educational institution, such as a reformatory, psychiatry or drug detoxification.