def get_sp_par(k, f, lines, fn=None):
ext = os.path.splitext(fn)[<NUM_LIT:1>] if fn else None<EOL>if not ext:<EOL><INDENT>ext = _guess_delim(lines)<EOL><DEDENT>if not fn:<EOL><INDENT>fn = randomize_filename(ext=ext)<EOL><DEDENT>elif not os.path.splitext(fn)[<NUM_LIT:1>]:<EOL><INDENT>fn = fn + ext<EOL><DEDENT>return k, f, SubPrjDataSpec(k, fn, lines)<EOL>
Create a particular test case parameterization scheme.

:param str k: the key/attr name for a metadata annotations file
:param function f: function with which to retrieve key's value from
    Project instance
:param Iterable[str] lines: collection of lines to write to the metadata
    annotations file named here
:param str fn: name for metadata annotations file, which will be bound
    as value to given key
:return str, function, namedtuple: 3-tuple in which first component is
    key/attr name, second is function with which to retrieve value for that
    key from a Project instance, and third is a specification used by a
    fixture to write the subproject's file(s) and to add the subproject
    metadata to a project's general configuration metadata.
:raise ValueError: if filename is not provided or one is provided without
    extension, and extension cannot be inferred from data lines