def parse_transform(transform_str):
if not transform_str:<EOL><INDENT>return np.identity(<NUM_LIT:3>)<EOL><DEDENT>elif not isinstance(transform_str, str):<EOL><INDENT>raise TypeError('<STR_LIT>')<EOL><DEDENT>total_transform = np.identity(<NUM_LIT:3>)<EOL>transform_substrs = transform_str.split('<STR_LIT:)>')[:-<NUM_LIT:1>]  <EOL>for substr in transform_substrs:<EOL><INDENT>total_transform = total_transform.dot(_parse_transform_substr(substr))<EOL><DEDENT>return total_transform<EOL>
Converts a valid SVG transformation string into a 3x3 matrix.
    If the string is empty or null, this returns a 3x3 identity matrix