def METHOD_NAME(pdf_path, page_number, stdout, gray=False):
    command = ['pdftoppm', '-f', str(page_number),
               '-singlefile', str(pdf_path)]
    if gray:
        command.insert(-1, '-gray')
    return Popen(command, shell=SHELL, stdout=stdout)