import tempfile


def create_temp_yaml_file(tmp_path_factory, content):
    """Creates a test YAML input file."""
    fhnd = tempfile.NamedTemporaryFile(mode='w',
                                       dir=tmp_path_factory.getbasetemp(),
                                       suffix='.yaml',
                                       delete=False)
    fhnd.write(content)
    return fhnd.name