def _process_single_doc(self, single_doc):
base_name, extension = os.path.splitext(single_doc)<EOL>if extension in ('<STR_LIT>', '<STR_LIT>'):<EOL><INDENT>if os.path.exists(os.path.join(SOURCE_PATH, single_doc)):<EOL><INDENT>return single_doc<EOL><DEDENT>else:<EOL><INDENT>raise FileNotFoundError('<STR_LIT>'.format(single_doc))<EOL><DEDENT><DEDENT>elif single_doc.startswith('<STR_LIT>'):<EOL><INDENT>try:<EOL><INDENT>obj = pandas  <EOL>for name in single_doc.split('<STR_LIT:.>'):<EOL><INDENT>obj = getattr(obj, name)<EOL><DEDENT><DEDENT>except AttributeError:<EOL><INDENT>raise ImportError('<STR_LIT>'.format(single_doc))<EOL><DEDENT>else:<EOL><INDENT>return single_doc[len('<STR_LIT>'):]<EOL><DEDENT><DEDENT>else:<EOL><INDENT>raise ValueError(('<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>').format(single_doc))<EOL><DEDENT>
Make sure the provided value for --single is a path to an existing
.rst/.ipynb file, or a pandas object that can be imported.

For example, categorial.rst or pandas.DataFrame.head. For the latter,
return the corresponding file path
(e.g. reference/api/pandas.DataFrame.head.rst).