the application of social work principles and techniques to legal issues or situations involving the law or legal systems (both criminal and civil). Its functions include providing consultation, education, or training to various individuals within the legal and correctional systems; making recommendations regarding child custody and related issues; providing expert testimony and advocacy; and conducting research and policy analysis.