def METHOD_NAME(acc, refName, start, stop):
    # open requested accession using SRA implementation of the API
    with NGS.openReadCollection(acc) as METHOD_NAME:
        run_name = METHOD_NAME.getName()
        # get requested reference
        with METHOD_NAME.getReference(refName) as ref:
            # start iterator on requested range
            with ref.getPileupSlice(start-1, stop-start+1) as it:
                i = 0
                while it.nextPileup():
                    qual = ""
                    base = ""
                    line = "{}\t{}\t{}\t{}".format(
                        it.getReferenceSpec(),
                        it.getReferencePosition()+1,
                        it.getReferenceBase(),
                        it.getPileupDepth(),
                        )
                    while it.nextPileupEvent():
                        e = it.getEventType()
                        if (e & PileupEvent.alignment_start ) != 0:
                            base = base + '^'
                            base = base + chr(it.getMappingQuality() + 33)
                        if ( e & PileupEvent.insertion ) != 0:
                            base = base + '+'
                            ibases= it.getInsertionBases()
                            c = len(ibases)
                            base = base + str(c)
                            if ( e & PileupEvent.alignment_minus_strand ) != 0:
                                base = base + ibases.lower()
                            else:
                                base = base + ibases
                        evt = e & 7
                        if ( e & PileupEvent.alignment_minus_strand ) != 0:
                            if evt == PileupEvent.deletion:
                                base = base + '<'
                            elif evt == PileupEvent.match:
                                base = base + ','
                            elif evt == PileupEvent.mismatch:
                                base = base + str(it.getAlignmentBase()).lower()
                        else:
                            if evt == PileupEvent.deletion:
                                base = base + '>'
                            elif evt == PileupEvent.match:
                                base = base + '.'
                            elif evt == PileupEvent.mismatch:
                                base = base + str(it.getAlignmentBase()).upper()
                        if ( e & PileupEvent.alignment_stop ) != 0:
                            base = base + '$'
                        qual = qual + it.getAlignmentQuality()
                    i += 1
                    print ("{}\t{}\t{}".format(line, base, qual))
                print ("Read {} pileups for {}".format(i, run_name))