def separate_substructures(tokenized_commands):
    """Returns a list of SVG substructures."""
    # every moveTo command starts a new substructure
    # an SVG substructure is a subpath that closes on itself
    # such as the outter and the inner edge of the character `o`
    substructures = []
    curr = []
    
    for cmd in tokenized_commands:
        if cmd[0] in 'mM' and len(curr) > 0:
            substructures.append(curr)
            curr = []
        curr.append(cmd)
    if len(curr) > 0:
        substructures.append(curr)
    return substructures