the county courts, statutory county courts, and district courts
 
trying criminal cases in each county shall adopt an instrument to be
 
used in conducting a pretrial risk assessment of a defendant
 
charged with an offense in that county. The instrument adopted must
 
be the automated pretrial risk assessment system developed under
 
Section 72.038, Government Code, or another instrument that is:
 
                         (1)    objective, validated for its intended use, and
 
standardized;
 
                         (2)    based on an analysis of empirical data and risk
 
factors relevant to:
 
                                     (A)    the risk of a defendant failing to appear in
 
court as required; and
 
                                     (B)    the safety of the community or of any person,
 
including the victim of the alleged offense, if the defendant is
 
released;
 
                         (3)    transparent and available for review by the
 
public; and
 
                         (4)    designed to reduce the likelihood of bail
 
decisions being affected by bias based on sex, race, or other
 
protected classifications.
 
             (b)    A magistrate considering the release on bail of a
 
defendant charged with an offense punishable as a Class B
 
misdemeanor or any higher category of offense shall order that:
 
                         (1)    the personal bond office established under Article
 
17.42 for the county in which the defendant is being detained, or
 
other suitably trained person, use the instrument adopted under
 
Subsection (a) to conduct a pretrial risk assessment with respect
 
to the defendant; and
 
                         (2)    the results of the assessment be provided to the
 
magistrate without unnecessary delay to ensure that the magistrate
 
is able to make a bail decision under Article 17.028 within the
 
period required by Subsection (a) of that article.
 
             (c)    A magistrate may not, without the consent of the
 
sheriff, order a sheriff or sheriff's department personnel to
 
conduct a pretrial risk assessment under Subsection (b).
 
             (d)    Notwithstanding Subsection (b), a magistrate may
 
personally conduct a pretrial risk assessment using an instrument
 
adopted under Subsection (a).
 
             (e)    The results of any pretrial risk assessment conducted
 
under this article must be promptly provided to the defendant and
 
the attorney representing the state.
 
             (f)    The magistrate must consider the results of the pretrial
 
risk assessment before making a bail decision under Article 17.028.