see e.g. https://github.com/rmcgibbo/mixtape/blob/master/Mixtape/sparsetica.py#L106 for the format.