def document_path(doc_id, options):
    """Return relative path to document from base output directory."""
    if options.dir_prefix is None:
        return ''
    else:
        return doc_id[:options.dir_prefix]