@staticmethod<EOL><INDENT>def _parse_subtype(dtype):<DEDENT>
xpr = re.compile(<EOL>r"<STR_LIT>"<EOL>)<EOL>m = xpr.match(dtype)<EOL>has_fill_value = False<EOL>if m:<EOL><INDENT>subtype = m.groupdict()['<STR_LIT>']<EOL>has_fill_value = m.groupdict()['<STR_LIT>'] or has_fill_value<EOL><DEDENT>elif dtype == "<STR_LIT>":<EOL><INDENT>subtype = '<STR_LIT>'<EOL><DEDENT>else:<EOL><INDENT>raise ValueError("<STR_LIT>".format(dtype))<EOL><DEDENT>return subtype, has_fill_value<EOL>
Parse a string to get the subtype

Parameters
----------
dtype : str
    A string like

    * Sparse[subtype]
    * Sparse[subtype, fill_value]

Returns
-------
subtype : str

Raises
------
ValueError
    When the subtype cannot be extracted.