def get_subfields(self, datafield, subfield, i1=None, i2=None,<EOL>exception=False):
if len(datafield) != <NUM_LIT:3>:<EOL><INDENT>raise ValueError(<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT>if len(subfield) != <NUM_LIT:1>:<EOL><INDENT>raise ValueError(<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT>if datafield not in self.datafields:<EOL><INDENT>if exception:<EOL><INDENT>raise KeyError(datafield + "<STR_LIT>")<EOL><DEDENT>return []<EOL><DEDENT>output = []<EOL>for datafield in self.datafields[datafield]:<EOL><INDENT>if subfield not in datafield:<EOL><INDENT>continue<EOL><DEDENT>for sfield in datafield[subfield]:<EOL><INDENT>if i1 and sfield.i1 != i1:<EOL><INDENT>continue<EOL><DEDENT>if i2 and sfield.i2 != i2:<EOL><INDENT>continue<EOL><DEDENT>output.append(sfield)<EOL><DEDENT><DEDENT>if not output and exception:<EOL><INDENT>raise KeyError(subfield + "<STR_LIT>")<EOL><DEDENT>return output<EOL>
Return content of given `subfield` in `datafield`.

Args:
    datafield (str): Section name (for example "001", "100", "700").
    subfield (str):  Subfield name (for example "a", "1", etc..).
    i1 (str, default None): Optional i1/ind1 parameter value, which
       will be used for search.
    i2 (str, default None): Optional i2/ind2 parameter value, which
       will be used for search.
    exception (bool): If ``True``, :exc:`~exceptions.KeyError` is
              raised when method couldn't found given `datafield` /
              `subfield`. If ``False``, blank array ``[]`` is returned.

Returns:
    list: of :class:`.MARCSubrecord`.

Raises:
    KeyError: If the subfield or datafield couldn't be found.

Note:
    MARCSubrecord is practically same thing as string, but has defined
    :meth:`.MARCSubrecord.i1` and :attr:`.MARCSubrecord.i2`
    methods.

    You may need to be able to get this, because MARC XML depends on
    i/ind parameters from time to time (names of authors for example).