def _makeNPIndex(indexList):
        newinds = []
        for i, item in enumerate(indexList):
            if isinstance(item, list):
                newinds.append(item)
            elif isinstance(item,int):
                newinds.append([item])
        numpyInd = list(np.ix_(*newinds))
        newinds=[]
        for item in indexList:
            if not item is None:
                newinds.append(numpyInd.pop(0))
            else:
                newinds.append(None)
        return tuple(newinds)
_makeNPIndex(indexList=[[0, 1], [0, 1]])


def _newname(self):
        self._genSetID+=1
        return "S@"+str(self._genSetID)
_newname(self=<harpy._header_sets._HeaderSet object at 0x7fd016315dc0>, self.dim_desc=['A', 'B'], self.dim_size=2, self.elemPosDict={'a': 0, 'b': 1}, self.name='SimpleSet', self.status='k')


def test_header_array_from_data(self):
        array_1d = np.array([1.0, 2.0, 3.0])
        array_2d = np.array([[1.0, 2.0], [3.0, 4.0]])
        array_7d = np.array(list(range(2**7)))
        array_7d.reshape((2, 2, 2, 2, 2, 2, 2))
        hao = HeaderArrayObj.HeaderArrayFromData(array=array_1d)
        self.assertTrue(hao.is_valid())
        hao = HeaderArrayObj.HeaderArrayFromData(array=array_2d)
        self.assertTrue(hao.is_valid())
        hao = HeaderArrayObj.HeaderArrayFromData(array=array_7d)
        self.assertTrue(hao.is_valid())
test_header_array_from_data(self=<harpy.tests.test_header_array.TestHeaderArray testMethod=test_header_array_from_data>, self._cleanups=[], self._outcome=<unittest.case._Outcome object at 0x7fd016330be0>, self._subtest=None, self._testMethodDoc=None, self._testMethodName='test_header_array_from_data', self._type_equality_funcs={<class 'dict'>: 'assertDictEqual', <class 'list'>: 'assertListEqual', <class 'tuple'>: 'assertTupleEqual', <class 'set'>: 'assertSetEqual', <class 'frozenset'>: 'assertSetEqual', <class 'str'>: 'assertMultiLineEqual'}, self.test_header_array_from_data=<bound method TestHeaderArray.test_header_array_from_data of <harpy.tests.test_header_array.TestHeaderArray testMethod=test_header_array_from_data>>)

{_coeff_name='            ', _array=array([1., 2., 3.]), _sets=<harpy._header_sets._HeaderDims object at 0x7fd0163cab50>, _long_name='                                                                      '}

{_coeff_name='            ', _array=array([[1., 2.],       [3., 4.]]), _sets=<harpy._header_sets._HeaderDims object at 0x7fd0163cac40>, _long_name='                                                                      '}


def SetHeaderFromData(setName: str, setElements:'Union[List[str], np.array]',  long_name: str=None):
        if not isinstance(setName,str):
            raise TypeError("setName must be of type str")
        if len(setName.strip()) > 12 :
            raise ValueError("setName is restricted to 12 Characters")
        if long_name is None: long_name=""
        if isinstance(long_name, str):
            long_name="Set "+setName.strip()+" "+long_name.strip()
        else:
            raise TypeError("LongName must be string")
        if isinstance(setElements,(list,np.ndarray)):
            if not all([isinstance(el,str) for el in setElements]):
                raise TypeError("All Set Elements must be of type str")
            if not all([len(el)<=12 for el in setElements]):
                raise ValueError("Set Elelement strings must be 12 characters at most")
        if isinstance(setElements,list):
            array=np.array(setElements)
            setElDict={setName:setElements}
        elif isinstance(setElements,np.ndarray):
            array=setElements
            setElDict = {setName: setElements.tolist()}
        else:
            raise TypeError("SetElemenets must be list of str or np array of strings")
        return HeaderArrayObj.HeaderArrayFromData(array=array, long_name=long_name, sets=[setName], setElDict=setElDict)
SetHeaderFromData(setName='sect', setElements=array(['s1          ', 's2          '], dtype='<U12'), long_name=' Sectors                                                                        ')

' Sectors                                                                        '


def fromSetShape(sets, setElDict, shape):
        setObjList=[]
        lowerDict=dict(zip([key.strip().lower() for key in setElDict.keys()], setElDict.keys() ))
        for idim, setName in enumerate(sets):
            lowSet=setName.strip().lower()
            if lowSet in lowerDict:
                setObjList.append(_HeaderSet(setName,'k',setElDict[lowerDict[lowSet]],shape[idim]))
            else:
                setObjList.append(_HeaderSet(setName, 'u', None, shape[idim]))
        return _HeaderDims(setObjList)
fromSetShape(sets=['sect'], setElDict={'sect': ['s1          ', 's2          ']}, shape=(2,))

[<harpy._header_sets._HeaderSet object at 0x7fd0163919a0>]


def generateSetDictEntry(self, i, resultsSet, setNames, setPos, varDims, varSetDict, varSetPtr):
        ndim = varDims.array[i, 0]
        if ndim > 0:
            varSetDict[self._variables[i].strip().lower()] = setNames.array[[j - 1 for j in varSetPtr.array[setPos:setPos + ndim, 0]]].tolist()
            varSetDict[self._variables[i].strip().lower()] = [name.strip() for name in varSetDict[self._variables[i].strip().lower()]]
            setPos += ndim
        else:
            varSetDict[self._variables[i].strip().lower()] = []
        if len(resultsSet) > 1: varSetDict[self._variables[i].strip().lower()].append("
        return setPos
generateSetDictEntry(self=<harpy.sl4.SL4 object at 0x7fd016330670>, i=0, resultsSet=['Cumulative', 'Effect of la', 'Effect of ca'], setNames={_coeff_name='            ', _array=array(['SECT        ', 'FAC         ', 'NUM_SECT    '], dtype='<U12'), _sets=<harpy._header_sets._HeaderDims object at 0x7fd016391b50>, _long_name='STNAM(NUMST) - names of the sets                                      '}, setPos=0, varDims={_coeff_name='            ', _array=array([[0],       [1],       [1],       [1],       [1],       [1],       [2],       [2],       [2],       [2],       [1]], dtype=int32), _sets=<harpy._header_sets._HeaderDims object at 0x7fd016307d60>, _long_name='VCNIND - number of arguments for variables (condensed+backsolved)     '}, varSetDict={}, varSetPtr={_coeff_name='            ', _array=array([[1],       [2],       [1],       [2],       [1],       [1],       [1],       [2],       [1],       [1],       [1],       [2],       [1],       [1]], dtype=int32), _sets=<harpy._header_sets._HeaderDims object at 0x7fd0163025b0>, _long_name='VCSTN - arguments for variables (condensed+backsolved)                '}, self._sets=['sect', 'fac', 'num_sect', '

['p_Y', 'p_PC', 'p_PF', 'p_XCOM', 'p_XFAC', 'p_XH', 'p_XC', 'p_XF', 'p_DVCOMIN', 'p_DVFACIN', 'p_DVHOUS']

{'sect': <harpy.header_array.HeaderArrayObj object at 0x7fd016391550>, 'fac': <harpy.header_array.HeaderArrayObj object at 0x7fd016391220>, 'num_sect': <harpy.header_array.HeaderArrayObj object at 0x7fd016391670>, '#results': <harpy.header_array.HeaderArrayObj object at 0x7fd0163915e0>}

<harpy.har_file.HarFileObj object at 0x7fd016330880>


def reshapeAndAdd(self, i, outDataList, varLabel, varSetDict):
        flatData = np.concatenate(outDataList)
        varSets = [thisSet.strip() for thisSet in varSetDict[self._variables[i].strip().lower()]]
        simSizes = tuple(
            [self.getSet(thisSet).array.shape[0] for thisSet in varSetDict[self._variables[i].strip().lower()]])
        setElDict = {}
        for myset in varSets:
            setElDict[myset.strip().lower()] = self.getSet(myset).array.tolist()
        finalData = flatData.reshape(simSizes,order="F").astype(np.float32)
        self.variableDict[self._variables[i].strip().lower()] = \
            HeaderArrayObj.HeaderArrayFromData(finalData,self._variables[i].strip()[0:12],varLabel.array[i][0:70], varSets, setElDict)
reshapeAndAdd(self=<harpy.sl4.SL4 object at 0x7fd016330670>, i=0, outDataList=[array([13.895816], dtype=float32), array([6.1105247], dtype=float32), array([7.7852945], dtype=float32)], varLabel={_coeff_name='            ', _array=array([' Total nominal household expenditure                                            ',       ' Price of commodity i                                                           ',       ' Price of factor f                                                              ',       ' Total demand for (or supply of) commodity i                                    ',       ' Total demand for (or supply of) factor f                                       ',       ' Household demand for commodity i                                               ',       ' Intermediate inputs of commodity i to industry j                               ',       ' Factor inputs to industry j                                                    ',       ' Dollar value of inputs of commodity i to industry j                            ',       ' Dollar value of factor f used in industry j                                    ',       ' Dollar value of household use of commodity i                                   '],      dtype='<U80'), _sets=<harpy._header_sets._HeaderDims object at 0x7fd016302a00>, _long_name='VCLB - labelling information for variables (condensed+backsolved)     '}, varSetDict={'p_y': ['

{'p_y': <harpy.header_array.HeaderArrayObj object at 0x7fd0163782e0>}

{'#results': ['Cumulative', 'Effect of la', 'Effect of ca']}


{'#results': ['Cumulative', 'Effect of la', 'Effect of ca']}


def insertShocks(flatData, i, nshk, nexo, shockList, shockPtr, shockVal):
        if nshk > 0:
            start = shockPtr.array[i, 0] - 1
            for j in range(0, nshk):
                shkInd = start + j
                if nshk == nexo:
                    varInd=j
                else:
                    varInd = shockList.array[shkInd, 0] - 1
                flatData[varInd] = shockVal.array[shkInd, 0]
insertShocks(flatData=array([0., 0.]), i=4, nshk=2, nexo=2, shockList={_coeff_name='            ', _array=array([], shape=(0, 1), dtype=int32), _sets=<harpy._header_sets._HeaderDims object at 0x7fd016378130>, _long_name='LIST for Shocked components (condensed+backsolved)                    '}, shockPtr={_coeff_name='            ', _array=array([[0],       [0],       [0],       [0],       [1],       [0],       [0],       [0],       [0],       [0],       [0]], dtype=int32), _sets=<harpy._header_sets._HeaderDims object at 0x7fd016302f70>, _long_name='Start pos of shocks for vars [header VARS] in shocks [header SHOC]    '}, shockVal={_coeff_name='            ', _array=array([[10.],       [20.]], dtype=float32), _sets=<harpy._header_sets._HeaderDims object at 0x7fd016302850>, _long_name='Shock values (nonzero ones only)                                      '})


def intern(self, name: PSLiteral.NameType) -> _SymbolT:
        if name in self.dict:
            lit = self.dict[name]
        else:
            lit = self.klass(name)
            self.dict[name] = lit
        return lit
intern(self=<pdfminer.psparser.PSSymbolTable object at 0x7f1a47c93610>, name=b'{', self.dict={}, self.klass=<class 'pdfminer.psparser.PSKeyword'>)

lit = self.klass(name)  # type: ignore[arg-type]


def add(cls, root: BitParserState, v: Union[int, str], bits: str) -> None:
        p: BitParserState = root
        b = None
        for i in range(len(bits)):
            if 0 < i:
                assert b is not None
                if p[b] is None:
                    p[b] = [None, None]
                p = p[b]
            if bits[i] == "1":
                b = 1
            else:
                b = 0
        assert b is not None
        p[b] = v
add(cls=<class 'pdfminer.ccitt.BitParser'>, root=[None, None], v=0, bits='1')


def set_ctm(self, ctm: Matrix) -> None:
        self.ctm = ctm
set_ctm(self=<PDFDevice>, ctm=[1, 0, 0, 1, 0, 0], self._stack=[], self.ctm=None, self.laparams=None, self.pageno=1, self.rsrcmgr=None)


def set_bbox(self, bbox: Rect) -> None:
        (x0, y0, x1, y1) = bbox
        self.x0 = x0
        self.y0 = y0
        self.x1 = x1
        self.y1 = y1
        self.width = x1 - x0
        self.height = y1 - y0
        self.bbox = bbox
set_bbox(self=REPR FAILED, bbox=[0, 100, 0, 100])


def get_bound(pts: Iterable[Point]) -> Rect:
    limit: Rect = (INF, INF, -INF, -INF)
    (x0, y0, x1, y1) = limit
    for (x, y) in pts:
        x0 = min(x0, x)
        y0 = min(y0, y)
        x1 = max(x1, x)
        y1 = max(y1, y)
    return x0, y0, x1, y1
get_bound(pts=[(6, 7), (7, 7)])


def _parse_wopen(self, s: bytes, i: int) -> int:
        c = s[i : i + 1]
        if c == b"<":
            self._add_token(KEYWORD_DICT_BEGIN)
            self._parse1 = self._parse_main
            i += 1
        else:
            self._parse1 = self._parse_hexstring
        return i
_parse_wopen(self=<PDFParser: <_io.BufferedReader name='samples/contrib/pr-00530-ml-lines.pdf'>, bufpos=210115>, s=b'trailer\n<</Root 82 0 R/ID[(\xf8\x00\x94\xe8\x97\xdc.\xefy\x04\xc0\xeaL\x98\xdb\xe9)(k\x0b\xb3\xc4\xcf\x8d\xe6?\x84\x10\x83i\xb68\xe2\xb8)]/Info 39 0 R/Size 83>>\nstartxref\n208444\n%%EOF\n', i=9, self._curtoken=b'', self._curtokenpos=210123, self._parse1=<bound method PSBaseParser._parse_wopen of <PDFParser: <_io.BufferedReader name='samples/contrib/pr-00530-ml-lines.pdf'>, bufpos=210115>>, self._tokens=[], self.buf=b'trailer\n<</Root 82 0 R/ID[(\xf8\x00\x94\xe8\x97\xdc.\xefy\x04\xc0\xeaL\x98\xdb\xe9)(k\x0b\xb3\xc4\xcf\x8d\xe6?\x84\x10\x83i\xb68\xe2\xb8)]/Info 39 0 R/Size 83>>\nstartxref\n208444\n%%EOF\n', self.bufpos=210115, self.charpos=9, self.context=[], self.curstack=[], self.curtype=None, self.doc=<pdfminer.pdfdocument.PDFDocument object at 0x7f1a45c2d9a0>, self.fallback=False, self.fp=<_io.BufferedReader name='samples/contrib/pr-00530-ml-lines.pdf'>, self.results=[])

<bound method PSBaseParser._parse_main of <PDFParser: <_io.BufferedReader name='samples/contrib/pr-00530-ml-lines.pdf'>, bufpos=210115>>


<bound method PSBaseParser._parse_main of <PDFParser: <_io.BufferedReader name='samples/contrib/pr-00530-ml-lines.pdf'>, bufpos=210115>>


def start_type(self, pos: int, type: str) -> None:
        self.context.append((pos, self.curtype, self.curstack))
        (self.curtype, self.curstack) = (type, [])
        log.debug("start_type: pos=%r, type=%r", pos, type)
        return
start_type(self=<PDFParser: <_io.BufferedReader name='samples/contrib/pr-00530-ml-lines.pdf'>, bufpos=210115>, pos=210123, type='d', self._curtoken=b'', self._curtokenpos=210123, self._parse1=<bound method PSBaseParser._parse_main of <PDFParser: <_io.BufferedReader name='samples/contrib/pr-00530-ml-lines.pdf'>, bufpos=210115>>, self._tokens=[], self.buf=b'trailer\n<</Root 82 0 R/ID[(\xf8\x00\x94\xe8\x97\xdc.\xefy\x04\xc0\xeaL\x98\xdb\xe9)(k\x0b\xb3\xc4\xcf\x8d\xe6?\x84\x10\x83i\xb68\xe2\xb8)]/Info 39 0 R/Size 83>>\nstartxref\n208444\n%%EOF\n', self.bufpos=210115, self.charpos=10, self.context=[], self.curstack=[], self.curtype=None, self.doc=<pdfminer.pdfdocument.PDFDocument object at 0x7f1a45c2d9a0>, self.fallback=False, self.fp=<_io.BufferedReader name='samples/contrib/pr-00530-ml-lines.pdf'>, self.results=[])


(self.curtype, self.curstack) = (type, [])


def _parse_literal(self, s: bytes, i: int) -> int:
        m = END_LITERAL.search(s, i)
        if not m:
            self._curtoken += s[i:]
            return len(s)
        j = m.start(0)
        self._curtoken += s[i:j]
        c = s[j : j + 1]
        if c == b"
            self.hex = b""
            self._parse1 = self._parse_literal_hex
            return j + 1
        try:
            name: Union[str, bytes] = str(self._curtoken, "utf-8")
        except Exception:
            name = self._curtoken
        self._add_token(LIT(name))
        self._parse1 = self._parse_main
        return j
_parse_literal(self=<PDFParser: <_io.BufferedReader name='samples/contrib/pr-00530-ml-lines.pdf'>, bufpos=210115>, s=b'trailer\n<</Root 82 0 R/ID[(\xf8\x00\x94\xe8\x97\xdc.\xefy\x04\xc0\xeaL\x98\xdb\xe9)(k\x0b\xb3\xc4\xcf\x8d\xe6?\x84\x10\x83i\xb68\xe2\xb8)]/Info 39 0 R/Size 83>>\nstartxref\n208444\n%%EOF\n', i=11, self._curtoken=b'', self._curtokenpos=210125, self._parse1=<bound method PSBaseParser._parse_literal of <PDFParser: <_io.BufferedReader name='samples/contrib/pr-00530-ml-lines.pdf'>, bufpos=210115>>, self._tokens=[], self.buf=b'trailer\n<</Root 82 0 R/ID[(\xf8\x00\x94\xe8\x97\xdc.\xefy\x04\xc0\xeaL\x98\xdb\xe9)(k\x0b\xb3\xc4\xcf\x8d\xe6?\x84\x10\x83i\xb68\xe2\xb8)]/Info 39 0 R/Size 83>>\nstartxref\n208444\n%%EOF\n', self.bufpos=210115, self.charpos=11, self.context=[(210123, None, [])], self.curstack=[], self.curtype='d', self.doc=<pdfminer.pdfdocument.PDFDocument object at 0x7f1a45c2d9a0>, self.fallback=False, self.fp=<_io.BufferedReader name='samples/contrib/pr-00530-ml-lines.pdf'>, self.results=[])

<re.Match object; span=(15, 16), match=b' '>


def push(self, *objs: PSStackEntry[ExtraT]) -> None:
        self.curstack.extend(objs)
        return
push(self=<PDFParser: <_io.BufferedReader name='samples/contrib/pr-00530-ml-lines.pdf'>, bufpos=210115>, objs=((210125, /'Root'),), self._curtoken=b'Root', self._curtokenpos=210125, self._parse1=<bound method PSBaseParser._parse_main of <PDFParser: <_io.BufferedReader name='samples/contrib/pr-00530-ml-lines.pdf'>, bufpos=210115>>, self._tokens=[], self.buf=b'trailer\n<</Root 82 0 R/ID[(\xf8\x00\x94\xe8\x97\xdc.\xefy\x04\xc0\xeaL\x98\xdb\xe9)(k\x0b\xb3\xc4\xcf\x8d\xe6?\x84\x10\x83i\xb68\xe2\xb8)]/Info 39 0 R/Size 83>>\nstartxref\n208444\n%%EOF\n', self.bufpos=210115, self.charpos=15, self.context=[(210123, None, [])], self.curstack=[], self.curtype='d', self.doc=<pdfminer.pdfdocument.PDFDocument object at 0x7f1a45c2d9a0>, self.fallback=False, self.fp=<_io.BufferedReader name='samples/contrib/pr-00530-ml-lines.pdf'>, self.results=[])


def _parse_number(self, s: bytes, i: int) -> int:
        m = END_NUMBER.search(s, i)
        if not m:
            self._curtoken += s[i:]
            return len(s)
        j = m.start(0)
        self._curtoken += s[i:j]
        c = s[j : j + 1]
        if c == b".":
            self._curtoken += c
            self._parse1 = self._parse_float
            return j + 1
        try:
            self._add_token(int(self._curtoken))
        except ValueError:
            pass
        self._parse1 = self._parse_main
        return j
_parse_number(self=<PDFParser: <_io.BufferedReader name='samples/contrib/pr-00530-ml-lines.pdf'>, bufpos=210115>, s=b'trailer\n<</Root 82 0 R/ID[(\xf8\x00\x94\xe8\x97\xdc.\xefy\x04\xc0\xeaL\x98\xdb\xe9)(k\x0b\xb3\xc4\xcf\x8d\xe6?\x84\x10\x83i\xb68\xe2\xb8)]/Info 39 0 R/Size 83>>\nstartxref\n208444\n%%EOF\n', i=17, self._curtoken=b'8', self._curtokenpos=210131, self._parse1=<bound method PSBaseParser._parse_number of <PDFParser: <_io.BufferedReader name='samples/contrib/pr-00530-ml-lines.pdf'>, bufpos=210115>>, self._tokens=[], self.buf=b'trailer\n<</Root 82 0 R/ID[(\xf8\x00\x94\xe8\x97\xdc.\xefy\x04\xc0\xeaL\x98\xdb\xe9)(k\x0b\xb3\xc4\xcf\x8d\xe6?\x84\x10\x83i\xb68\xe2\xb8)]/Info 39 0 R/Size 83>>\nstartxref\n208444\n%%EOF\n', self.bufpos=210115, self.charpos=17, self.context=[(210123, None, [])], self.curstack=[(210125, /'Root')], self.curtype='d', self.doc=<pdfminer.pdfdocument.PDFDocument object at 0x7f1a45c2d9a0>, self.fallback=False, self.fp=<_io.BufferedReader name='samples/contrib/pr-00530-ml-lines.pdf'>, self.results=[])

<re.Match object; span=(18, 19), match=b' '>


def pop(self, n: int) -> List[PSStackEntry[ExtraT]]:
        objs = self.curstack[-n:]
        self.curstack[-n:] = []
        return objs
pop(self=<PDFParser: <_io.BufferedReader name='samples/contrib/pr-00530-ml-lines.pdf'>, bufpos=210115>, n=2, self._curtoken=b'R', self._curtokenpos=210136, self._parse1=<bound method PSBaseParser._parse_main of <PDFParser: <_io.BufferedReader name='samples/contrib/pr-00530-ml-lines.pdf'>, bufpos=210115>>, self._tokens=[], self.buf=b'trailer\n<</Root 82 0 R/ID[(\xf8\x00\x94\xe8\x97\xdc.\xefy\x04\xc0\xeaL\x98\xdb\xe9)(k\x0b\xb3\xc4\xcf\x8d\xe6?\x84\x10\x83i\xb68\xe2\xb8)]/Info 39 0 R/Size 83>>\nstartxref\n208444\n%%EOF\n', self.bufpos=210115, self.charpos=22, self.context=[(210123, None, [])], self.curstack=[(210125, /'Root'), (210131, 82), (210134, 0)], self.curtype='d', self.doc=<pdfminer.pdfdocument.PDFDocument object at 0x7f1a45c2d9a0>, self.fallback=False, self.fp=<_io.BufferedReader name='samples/contrib/pr-00530-ml-lines.pdf'>, self.results=[])


def _parse_string(self, s: bytes, i: int) -> int:
        m = END_STRING.search(s, i)
        if not m:
            self._curtoken += s[i:]
            return len(s)
        j = m.start(0)
        self._curtoken += s[i:j]
        c = s[j : j + 1]
        if c == b"\\":
            self.oct = b""
            self._parse1 = self._parse_string_1
            return j + 1
        if c == b"(":
            self.paren += 1
            self._curtoken += c
            return j + 1
        if c == b")":
            self.paren -= 1
            if self.paren:
                self._curtoken += c
                return j + 1
        self._add_token(self._curtoken)
        self._parse1 = self._parse_main
        return j + 1
_parse_string(self=<PDFParser: <_io.BufferedReader name='samples/contrib/pr-00530-ml-lines.pdf'>, bufpos=210115>, s=b'trailer\n<</Root 82 0 R/ID[(\xf8\x00\x94\xe8\x97\xdc.\xefy\x04\xc0\xeaL\x98\xdb\xe9)(k\x0b\xb3\xc4\xcf\x8d\xe6?\x84\x10\x83i\xb68\xe2\xb8)]/Info 39 0 R/Size 83>>\nstartxref\n208444\n%%EOF\n', i=27, self._curtoken=b'', self._curtokenpos=210141, self._parse1=<bound method PSBaseParser._parse_string of <PDFParser: <_io.BufferedReader name='samples/contrib/pr-00530-ml-lines.pdf'>, bufpos=210115>>, self._tokens=[], self.buf=b'trailer\n<</Root 82 0 R/ID[(\xf8\x00\x94\xe8\x97\xdc.\xefy\x04\xc0\xeaL\x98\xdb\xe9)(k\x0b\xb3\xc4\xcf\x8d\xe6?\x84\x10\x83i\xb68\xe2\xb8)]/Info 39 0 R/Size 83>>\nstartxref\n208444\n%%EOF\n', self.bufpos=210115, self.charpos=27, self.context=[(210123, None, []), (210140, 'd', [(210125, /'Root'), (210136, <PDFObjRef:82>), (210137, /'ID')])], self.curstack=[], self.curtype='a', self.doc=<pdfminer.pdfdocument.PDFDocument object at 0x7f1a45c2d9a0>, self.fallback=False, self.fp=<_io.BufferedReader name='samples/contrib/pr-00530-ml-lines.pdf'>, self.paren=1, self.results=[])

<re.Match object; span=(43, 44), match=b')'>


def end_type(self, type: str) -> Tuple[int, List[PSStackType[ExtraT]]]:
        if self.curtype != type:
            raise PSTypeError("Type mismatch: {!r} != {!r}".format(self.curtype, type))
        objs = [obj for (_, obj) in self.curstack]
        (pos, self.curtype, self.curstack) = self.context.pop()
        log.debug("end_type: pos=%r, type=%r, objs=%r", pos, type, objs)
        return (pos, objs)
end_type(self=<PDFParser: <_io.BufferedReader name='samples/contrib/pr-00530-ml-lines.pdf'>, bufpos=210115>, type='a', self._curtoken=b'k\x0b\xb3\xc4\xcf\x8d\xe6?\x84\x10\x83i\xb68\xe2\xb8', self._curtokenpos=210177, self._parse1=<bound method PSBaseParser._parse_main of <PDFParser: <_io.BufferedReader name='samples/contrib/pr-00530-ml-lines.pdf'>, bufpos=210115>>, self._tokens=[], self.buf=b'trailer\n<</Root 82 0 R/ID[(\xf8\x00\x94\xe8\x97\xdc.\xefy\x04\xc0\xeaL\x98\xdb\xe9)(k\x0b\xb3\xc4\xcf\x8d\xe6?\x84\x10\x83i\xb68\xe2\xb8)]/Info 39 0 R/Size 83>>\nstartxref\n208444\n%%EOF\n', self.bufpos=210115, self.charpos=63, self.context=[(210123, None, []), (210140, 'd', [(210125, /'Root'), (210136, <PDFObjRef:82>), (210137, /'ID')])], self.curstack=[(210141, b'\xf8\x00\x94\xe8\x97\xdc.\xefy\x04\xc0\xeaL\x98\xdb\xe9'), (210159, b'k\x0b\xb3\xc4\xcf\x8d\xe6?\x84\x10\x83i\xb68\xe2\xb8')], self.curtype='a', self.doc=<pdfminer.pdfdocument.PDFDocument object at 0x7f1a45c2d9a0>, self.fallback=False, self.fp=<_io.BufferedReader name='samples/contrib/pr-00530-ml-lines.pdf'>, self.paren=0, self.results=[])


def _parse_wclose(self, s: bytes, i: int) -> int:
        c = s[i : i + 1]
        if c == b">":
            self._add_token(KEYWORD_DICT_END)
            i += 1
        self._parse1 = self._parse_main
        return i
_parse_wclose(self=<PDFParser: <_io.BufferedReader name='samples/contrib/pr-00530-ml-lines.pdf'>, bufpos=210115>, s=b'trailer\n<</Root 82 0 R/ID[(\xf8\x00\x94\xe8\x97\xdc.\xefy\x04\xc0\xeaL\x98\xdb\xe9)(k\x0b\xb3\xc4\xcf\x8d\xe6?\x84\x10\x83i\xb68\xe2\xb8)]/Info 39 0 R/Size 83>>\nstartxref\n208444\n%%EOF\n', i=84, self._curtoken=b'', self._curtokenpos=210198, self._parse1=<bound method PSBaseParser._parse_wclose of <PDFParser: <_io.BufferedReader name='samples/contrib/pr-00530-ml-lines.pdf'>, bufpos=210115>>, self._tokens=[], self.buf=b'trailer\n<</Root 82 0 R/ID[(\xf8\x00\x94\xe8\x97\xdc.\xefy\x04\xc0\xeaL\x98\xdb\xe9)(k\x0b\xb3\xc4\xcf\x8d\xe6?\x84\x10\x83i\xb68\xe2\xb8)]/Info 39 0 R/Size 83>>\nstartxref\n208444\n%%EOF\n', self.bufpos=210115, self.charpos=84, self.context=[(210123, None, [])], self.curstack=[(210125, /'Root'), (210136, <PDFObjRef:82>), (210137, /'ID'), (210140, [b'\xf8\x00\x94\xe8\x97\xdc.\xefy\x04\xc0\xeaL\x98\xdb\xe9', b'k\x0b\xb3\xc4\xcf\x8d\xe6?\x84\x10\x83i\xb68\xe2\xb8']), (210178, /'Info'), (210189, <PDFObjRef:39>), (210190, /'Size'), (210196, 83)], self.curtype='d', self.doc=<pdfminer.pdfdocument.PDFDocument object at 0x7f1a45c2d9a0>, self.fallback=False, self.fp=<_io.BufferedReader name='samples/contrib/pr-00530-ml-lines.pdf'>, self.paren=0, self.results=[])


def add_results(self, *objs: PSStackEntry[ExtraT]) -> None:
        try:
            log.debug("add_results: %r", objs)
        except Exception:
            log.debug("add_results: (unprintable object)")
        self.results.extend(objs)
        return
add_results(self=<PDFParser: <_io.BufferedReader name='samples/contrib/pr-00530-ml-lines.pdf'>, bufpos=210115>, objs=((210123, {'Root': <PDFObjRef:82>, 'ID': [b'\xf8\x00\x94\xe8\x97\xdc.\xefy\x04\xc0\xeaL\x98\xdb\xe9', b'k\x0b\xb3\xc4\xcf\x8d\xe6?\x84\x10\x83i\xb68\xe2\xb8'], 'Info': <PDFObjRef:39>, 'Size': 83}),), self._curtoken=b'startxref', self._curtokenpos=210201, self._parse1=<bound method PSBaseParser._parse_main of <PDFParser: <_io.BufferedReader name='samples/contrib/pr-00530-ml-lines.pdf'>, bufpos=210115>>, self._tokens=[], self.buf=b'trailer\n<</Root 82 0 R/ID[(\xf8\x00\x94\xe8\x97\xdc.\xefy\x04\xc0\xeaL\x98\xdb\xe9)(k\x0b\xb3\xc4\xcf\x8d\xe6?\x84\x10\x83i\xb68\xe2\xb8)]/Info 39 0 R/Size 83>>\nstartxref\n208444\n%%EOF\n', self.bufpos=210115, self.charpos=95, self.context=[], self.curstack=[], self.curtype=None, self.doc=<pdfminer.pdfdocument.PDFDocument object at 0x7f1a45c2d9a0>, self.fallback=False, self.fp=<_io.BufferedReader name='samples/contrib/pr-00530-ml-lines.pdf'>, self.paren=0, self.results=[])


def dict_value(x: object) -> Dict[Any, Any]:
    x = resolve1(x)
    if not isinstance(x, dict):
        if settings.STRICT:
            logger.error("PDFTypeError : Dict required: %r", x)
            raise PDFTypeError("Dict required: %r" % x)
        return {}
    return x
dict_value(x=<PDFObjRef:39>)

{'Producer': b'iText\xae 5.5.13 \xa92000-2018 iText Group NV (Government Publishing Office; licensed version)', 'CreationDate': b'D:20200806095125Z', 'ModDate': b"D:20200806055139-04'00'", 'Creator': b'govinfo, U. S. Government Publishing Office'}


def _getobj_parse(self, pos: int, objid: int) -> object:
        assert self._parser is not None
        self._parser.seek(pos)
        (_, objid1) = self._parser.nexttoken()
        (_, genno) = self._parser.nexttoken()
        (_, kwd) = self._parser.nexttoken()
        if objid1 != objid:
            x = []
            while kwd is not self.KEYWORD_OBJ:
                (_, kwd) = self._parser.nexttoken()
                x.append(kwd)
            if len(x) >= 2:
                objid1 = x[-2]
        if objid1 != objid:
            raise PDFSyntaxError("objid mismatch: {!r}={!r}".format(objid1, objid))
        if kwd != KWD(b"obj"):
            raise PDFSyntaxError("Invalid object spec: offset=%r" % pos)
        (_, obj) = self._parser.nextobject()
        return obj
_getobj_parse(self=<pdfminer.pdfdocument.PDFDocument object at 0x7f1a45c2d9a0>, pos=114857, objid=39, self._cached_objs={}, self._parsed_objs={}, self._parser=<PDFParser: <_io.BufferedReader name='samples/contrib/pr-00530-ml-lines.pdf'>, bufpos=210115>, self.caching=True, self.catalog={}, self.decipher=None, self.encryption=None, self.info=[], self.is_extractable=True, self.is_modifiable=True, self.is_printable=True, self.xrefs=[<PDFXRef: offsets=dict_keys([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82])>])

<PDFParser: <_io.BufferedReader name='samples/contrib/pr-00530-ml-lines.pdf'>, bufpos=114857>

{'Producer': b'iText\xae 5.5.13 \xa92000-2018 iText Group NV (Government Publishing Office; licensed version)', 'CreationDate': b'D:20200806095125Z', 'ModDate': b"D:20200806055139-04'00'", 'Creator': b'govinfo, U. S. Government Publishing Office'}


(_, objid1) = self._parser.nexttoken()  # objid


(_, genno) = self._parser.nexttoken()  # genno


def stream_value(x: object) -> "PDFStream":
    x = resolve1(x)
    if not isinstance(x, PDFStream):
        if settings.STRICT:
            raise PDFTypeError("PDFStream required: %r" % x)
        return PDFStream({}, b"")
    return x
stream_value(x=<PDFObjRef:52>)

<PDFStream(52): raw=275, {'Filter': /'FlateDecode', 'Length': 275}>


def set_objid(self, objid: int, genno: int) -> None:
        self.objid = objid
        self.genno = genno
set_objid(self=<PDFStream(None): raw=275, {'Filter': /'FlateDecode', 'Length': 275}>, objid=52, genno=0, self.attrs={'Filter': /'FlateDecode', 'Length': 275}, self.data=None, self.decipher=None, self.genno=None, self.objid=None, self.rawdata=b'h\xdeTQMo\xc3 \x0c\xbd\xf3+|\xec\xb4\x03\x84,\xca&\xa1H[\xbbJ9\xecCk\xbb;\x01\'CZ\x08"\xc9!\xff~@\xb2N;\x00\xcf\xf6\xb3\x9fm\xe8\xbe>\xd4\xd6L@\xdf\xfd\xa0N8Ak\xac\xf68\x0e\xb3W\x08\rv\xc6B\xc6A\x1b5mV\xbaU/\x1d\xd0\x90|Z\xc6\t\xfb\xda\xb6\x03\x08A\xe8G\x08\x8e\x93_`w,n\xd9\r\xd07\xaf\xd1\x1b\xdb\xc1\xee\x9c]>\x83\xe34;\xf7\x8d=\xda\t\x18T\x15hl\t\xdd\xbfH\xf7*{\x04\x1a\xd3\xfe|\xe7\xc5!\xf0dg\x9b\xf0\xa0qtR\xa1\x97\xb6C\x10\x8cW tY\x01Z\xfd?F\xca5\xa3i\xd5\x97\xf4D\xb0\xbb\xc0d\xf9\xc3s\x15p\x111{\x8c\x98\xb3\x84\xc3CD\xd1&\\\x1c\x03\xbe\x8f~\xce8\x0f\xb8Y9O\x91\x13\xc5\x02>\x94\x15\t\x9a[\xf5\xecWk\x95^\xdbby\xaa\x90\xf3\x8d\xb9\xc6b\xa3q{\xd7\x99\xd5\xec}XGZq\x9a:\xcek,^\x7f\xc1\r.\x8e\x17\x0f\xf9\x11`\x00b\x9b\x83\xdc')

<PDFStream(52): raw=275, {'Filter': /'FlateDecode', 'Length': 275}>


def get_data(self) -> bytes:
        if self.data is None:
            self.decode()
            assert self.data is not None
        return self.data
get_data(self=<PDFStream(52): raw=275, {'Filter': /'FlateDecode', 'Length': 275}>, self.attrs={'Filter': /'FlateDecode', 'Length': 275}, self.data=None, self.decipher=None, self.genno=0, self.objid=52, self.rawdata=b'h\xdeTQMo\xc3 \x0c\xbd\xf3+|\xec\xb4\x03\x84,\xca&\xa1H[\xbbJ9\xecCk\xbb;\x01\'CZ\x08"\xc9!\xff~@\xb2N;\x00\xcf\xf6\xb3\x9fm\xe8\xbe>\xd4\xd6L@\xdf\xfd\xa0N8Ak\xac\xf68\x0e\xb3W\x08\rv\xc6B\xc6A\x1b5mV\xbaU/\x1d\xd0\x90|Z\xc6\t\xfb\xda\xb6\x03\x08A\xe8G\x08\x8e\x93_`w,n\xd9\r\xd07\xaf\xd1\x1b\xdb\xc1\xee\x9c]>\x83\xe34;\xf7\x8d=\xda\t\x18T\x15hl\t\xdd\xbfH\xf7*{\x04\x1a\xd3\xfe|\xe7\xc5!\xf0dg\x9b\xf0\xa0qtR\xa1\x97\xb6C\x10\x8cW tY\x01Z\xfd?F\xca5\xa3i\xd5\x97\xf4D\xb0\xbb\xc0d\xf9\xc3s\x15p\x111{\x8c\x98\xb3\x84\xc3CD\xd1&\\\x1c\x03\xbe\x8f~\xce8\x0f\xb8Y9O\x91\x13\xc5\x02>\x94\x15\t\x9a[\xf5\xecWk\x95^\xdbby\xaa\x90\xf3\x8d\xb9\xc6b\xa3q{\xd7\x99\xd5\xec}XGZq\x9a:\xcek,^\x7f\xc1\r.\x8e\x17\x0f\xf9\x11`\x00b\x9b\x83\xdc')

<PDFStream(52): len=433, {'Filter': /'FlateDecode', 'Length': 275}>

b'/CIDInit /ProcSet findresource begin 12 dict begin begincmap /CIDSystemInfo <<\n/Registry (F5+0) /Ordering (T1UV) /Supplement 0 >> def\n/CMapName /F5+0 def\n/CMapType 2 def\n1 begincodespacerange <02> <d7> endcodespacerange\n7 beginbfchar\n<04> <039E>\n<05> <00AE>\n<20> <0020>\n<5f> <005F>\n<80> <2022>\n<b0> <00B0>\n<d7> <00D7>\nendbfchar\n1 beginbfrange\n<02> <03> <2032>\nendbfrange\nendcmap CMapName currentdict /CMap defineresource pop end end\n'


def decode(self) -> None:
        assert self.data is None and self.rawdata is not None, str(
            (self.data, self.rawdata)
        )
        data = self.rawdata
        if self.decipher:
            assert self.objid is not None
            assert self.genno is not None
            data = self.decipher(self.objid, self.genno, data, self.attrs)
        filters = self.get_filters()
        if not filters:
            self.data = data
            self.rawdata = None
            return
        for (f, params) in filters:
            if f in LITERALS_FLATE_DECODE:
                try:
                    data = zlib.decompress(data)
                except zlib.error as e:
                    if settings.STRICT:
                        error_msg = "Invalid zlib bytes: {!r}, {!r}".format(e, data)
                        raise PDFException(error_msg)
                    try:
                        data = decompress_corrupted(data)
                    except zlib.error:
                        data = b""
            elif f in LITERALS_LZW_DECODE:
                data = lzwdecode(data)
            elif f in LITERALS_ASCII85_DECODE:
                data = ascii85decode(data)
            elif f in LITERALS_ASCIIHEX_DECODE:
                data = asciihexdecode(data)
            elif f in LITERALS_RUNLENGTH_DECODE:
                data = rldecode(data)
            elif f in LITERALS_CCITTFAX_DECODE:
                data = ccittfaxdecode(data, params)
            elif f in LITERALS_DCT_DECODE:
                pass
            elif f in LITERALS_JBIG2_DECODE:
                pass
            elif f in LITERALS_JPX_DECODE:
                pass
            elif f == LITERAL_CRYPT:
                raise PDFNotImplementedError("/Crypt filter is unsupported")
            else:
                raise PDFNotImplementedError("Unsupported filter: %r" % f)
            if params and "Predictor" in params:
                pred = int_value(params["Predictor"])
                if pred == 1:
                    pass
                elif 10 <= pred:
                    colors = int_value(params.get("Colors", 1))
                    columns = int_value(params.get("Columns", 1))
                    raw_bits_per_component = params.get("BitsPerComponent", 8)
                    bitspercomponent = int_value(raw_bits_per_component)
                    data = apply_png_predictor(
                        pred, colors, columns, bitspercomponent, data
                    )
                else:
                    error_msg = "Unsupported predictor: %r" % pred
                    raise PDFNotImplementedError(error_msg)
        self.data = data
        self.rawdata = None
        return
decode(self=<PDFStream(52): raw=275, {'Filter': /'FlateDecode', 'Length': 275}>, self.attrs={'Filter': /'FlateDecode', 'Length': 275}, self.data=None, self.decipher=None, self.genno=0, self.objid=52, self.rawdata=b'h\xdeTQMo\xc3 \x0c\xbd\xf3+|\xec\xb4\x03\x84,\xca&\xa1H[\xbbJ9\xecCk\xbb;\x01\'CZ\x08"\xc9!\xff~@\xb2N;\x00\xcf\xf6\xb3\x9fm\xe8\xbe>\xd4\xd6L@\xdf\xfd\xa0N8Ak\xac\xf68\x0e\xb3W\x08\rv\xc6B\xc6A\x1b5mV\xbaU/\x1d\xd0\x90|Z\xc6\t\xfb\xda\xb6\x03\x08A\xe8G\x08\x8e\x93_`w,n\xd9\r\xd07\xaf\xd1\x1b\xdb\xc1\xee\x9c]>\x83\xe34;\xf7\x8d=\xda\t\x18T\x15hl\t\xdd\xbfH\xf7*{\x04\x1a\xd3\xfe|\xe7\xc5!\xf0dg\x9b\xf0\xa0qtR\xa1\x97\xb6C\x10\x8cW tY\x01Z\xfd?F\xca5\xa3i\xd5\x97\xf4D\xb0\xbb\xc0d\xf9\xc3s\x15p\x111{\x8c\x98\xb3\x84\xc3CD\xd1&\\\x1c\x03\xbe\x8f~\xce8\x0f\xb8Y9O\x91\x13\xc5\x02>\x94\x15\t\x9a[\xf5\xecWk\x95^\xdbby\xaa\x90\xf3\x8d\xb9\xc6b\xa3q{\xd7\x99\xd5\xec}XGZq\x9a:\xcek,^\x7f\xc1\r.\x8e\x17\x0f\xf9\x11`\x00b\x9b\x83\xdc')

b'/CIDInit /ProcSet findresource begin 12 dict begin begincmap /CIDSystemInfo <<\n/Registry (F5+0) /Ordering (T1UV) /Supplement 0 >> def\n/CMapName /F5+0 def\n/CMapType 2 def\n1 begincodespacerange <02> <d7> endcodespacerange\n7 beginbfchar\n<04> <039E>\n<05> <00AE>\n<20> <0020>\n<5f> <005F>\n<80> <2022>\n<b0> <00B0>\n<d7> <00D7>\nendbfchar\n1 beginbfrange\n<02> <03> <2032>\nendbfrange\nendcmap CMapName currentdict /CMap defineresource pop end end\n'


def get_filters(self) -> List[Tuple[Any, Any]]:
        filters = self.get_any(("F", "Filter"))
        params = self.get_any(("DP", "DecodeParms", "FDecodeParms"), {})
        if not filters:
            return []
        if not isinstance(filters, list):
            filters = [filters]
        if not isinstance(params, list):
            params = [params] * len(filters)
        if settings.STRICT and len(params) != len(filters):
            raise PDFException("Parameters len filter mismatch")
        resolved_filters = [resolve1(f) for f in filters]
        resolved_params = [resolve1(param) for param in params]
        return list(zip(resolved_filters, resolved_params))
get_filters(self=<PDFStream(52): raw=275, {'Filter': /'FlateDecode', 'Length': 275}>, self.attrs={'Filter': /'FlateDecode', 'Length': 275}, self.data=None, self.decipher=None, self.genno=0, self.objid=52, self.rawdata=b'h\xdeTQMo\xc3 \x0c\xbd\xf3+|\xec\xb4\x03\x84,\xca&\xa1H[\xbbJ9\xecCk\xbb;\x01\'CZ\x08"\xc9!\xff~@\xb2N;\x00\xcf\xf6\xb3\x9fm\xe8\xbe>\xd4\xd6L@\xdf\xfd\xa0N8Ak\xac\xf68\x0e\xb3W\x08\rv\xc6B\xc6A\x1b5mV\xbaU/\x1d\xd0\x90|Z\xc6\t\xfb\xda\xb6\x03\x08A\xe8G\x08\x8e\x93_`w,n\xd9\r\xd07\xaf\xd1\x1b\xdb\xc1\xee\x9c]>\x83\xe34;\xf7\x8d=\xda\t\x18T\x15hl\t\xdd\xbfH\xf7*{\x04\x1a\xd3\xfe|\xe7\xc5!\xf0dg\x9b\xf0\xa0qtR\xa1\x97\xb6C\x10\x8cW tY\x01Z\xfd?F\xca5\xa3i\xd5\x97\xf4D\xb0\xbb\xc0d\xf9\xc3s\x15p\x111{\x8c\x98\xb3\x84\xc3CD\xd1&\\\x1c\x03\xbe\x8f~\xce8\x0f\xb8Y9O\x91\x13\xc5\x02>\x94\x15\t\x9a[\xf5\xecWk\x95^\xdbby\xaa\x90\xf3\x8d\xb9\xc6b\xa3q{\xd7\x99\xd5\xec}XGZq\x9a:\xcek,^\x7f\xc1\r.\x8e\x17\x0f\xf9\x11`\x00b\x9b\x83\xdc')


params = self.get_any(("DP", "DecodeParms", "FDecodeParms"), {})


def popall(self) -> List[PSStackEntry[ExtraT]]:
        objs = self.curstack
        self.curstack = []
        return objs
popall(self=<CMapParser: <_io.BytesIO object at 0x7f1a4346d9f0>, bufpos=0>, self._curtoken=b'begincmap', self._curtokenpos=51, self._in_cmap=True, self._parse1=<bound method PSBaseParser._parse_main of <CMapParser: <_io.BytesIO object at 0x7f1a4346d9f0>, bufpos=0>>, self._tokens=[], self._warnings=set(), self.buf=b'/CIDInit /ProcSet findresource begin 12 dict begin begincmap /CIDSystemInfo <<\n/Registry (F5+0) /Ordering (T1UV) /Supplement 0 >> def\n/CMapName /F5+0 def\n/CMapType 2 def\n1 begincodespacerange <02> <d7> endcodespacerange\n7 beginbfchar\n<04> <039E>\n<05> <00AE>\n<20> <0020>\n<5f> <005F>\n<80> <2022>\n<b0> <00B0>\n<d7> <00D7>\nendbfchar\n1 beginbfrange\n<02> <03> <2032>\nendbfrange\nendcmap CMapName currentdict /CMap defineresource pop end end\n', self.bufpos=0, self.charpos=60, self.cmap=<UnicodeMap: None>, self.context=[], self.curstack=[(0, /'CIDInit'), (9, /'ProcSet'), (18, /b'findresource'), (31, /b'begin'), (37, 12), (40, /b'dict'), (45, /b'begin')], self.curtype=None, self.fp=<_io.BytesIO object at 0x7f1a4346d9f0>, self.results=[])


def set_attr(self, k: str, v: object) -> None:
        self.attrs[k] = v
set_attr(self=<UnicodeMap: None>, k='CIDSystemInfo', v={'Registry': b'F5+0', 'Ordering': b'T1UV', 'Supplement': 0}, self.attrs={}, self.cid2unichr={})

{'CIDSystemInfo': {'Registry': b'F5+0', 'Ordering': b'T1UV', 'Supplement': 0}}


def _parse_hexstring(self, s: bytes, i: int) -> int:
        m = END_HEX_STRING.search(s, i)
        if not m:
            self._curtoken += s[i:]
            return len(s)
        j = m.start(0)
        self._curtoken += s[i:j]
        token = HEX_PAIR.sub(
            lambda m: bytes((int(m.group(0), 16),)), SPC.sub(b"", self._curtoken)
        )
        self._add_token(token)
        self._parse1 = self._parse_main
        return j
_parse_hexstring(self=<CMapParser: <_io.BytesIO object at 0x7f1a4346d9f0>, bufpos=0>, s=b'/CIDInit /ProcSet findresource begin 12 dict begin begincmap /CIDSystemInfo <<\n/Registry (F5+0) /Ordering (T1UV) /Supplement 0 >> def\n/CMapName /F5+0 def\n/CMapType 2 def\n1 begincodespacerange <02> <d7> endcodespacerange\n7 beginbfchar\n<04> <039E>\n<05> <00AE>\n<20> <0020>\n<5f> <005F>\n<80> <2022>\n<b0> <00B0>\n<d7> <00D7>\nendbfchar\n1 beginbfrange\n<02> <03> <2032>\nendbfrange\nendcmap CMapName currentdict /CMap defineresource pop end end\n', i=193, self._curtoken=b'', self._curtokenpos=192, self._in_cmap=True, self._parse1=<bound method PSBaseParser._parse_hexstring of <CMapParser: <_io.BytesIO object at 0x7f1a4346d9f0>, bufpos=0>>, self._tokens=[], self._warnings=set(), self.buf=b'/CIDInit /ProcSet findresource begin 12 dict begin begincmap /CIDSystemInfo <<\n/Registry (F5+0) /Ordering (T1UV) /Supplement 0 >> def\n/CMapName /F5+0 def\n/CMapType 2 def\n1 begincodespacerange <02> <d7> endcodespacerange\n7 beginbfchar\n<04> <039E>\n<05> <00AE>\n<20> <0020>\n<5f> <005F>\n<80> <2022>\n<b0> <00B0>\n<d7> <00D7>\nendbfchar\n1 beginbfrange\n<02> <03> <2032>\nendbfrange\nendcmap CMapName currentdict /CMap defineresource pop end end\n', self.bufpos=0, self.charpos=193, self.cmap=<UnicodeMap: /'F5+0'>, self.context=[], self.curstack=[], self.curtype=None, self.fp=<_io.BytesIO object at 0x7f1a4346d9f0>, self.paren=0, self.results=[])

<re.Match object; span=(195, 196), match=b'>'>


def fillfp(self) -> None:
        if not self.fp:
            if self.istream < len(self.streams):
                strm = stream_value(self.streams[self.istream])
                self.istream += 1
            else:
                raise PSEOF("Unexpected EOF, file truncated?")
            self.fp = BytesIO(strm.get_data())
fillfp(self=REPR FAILED, self.fp=None, self.istream=0, self.streams=[<PDFObjRef:80>, <PDFObjRef:74>, <PDFObjRef:71>, <PDFObjRef:42>, <PDFObjRef:32>, <PDFObjRef:21>, <PDFObjRef:73>, <PDFObjRef:68>])

<PDFStream(80): raw=651, {'Filter': /'FlateDecode', 'Length': 651}>

<PDFStream(80): len=1360, {'Filter': /'FlateDecode', 'Length': 651}>


<PDFStream(80): len=1360, {'Filter': /'FlateDecode', 'Length': 651}>


def do_q(self) -> None:
        self.gstack.append(self.get_current_state())
        return
do_q(self=<pdfminer.pdfinterp.PDFPageInterpreter object at 0x7f1a47ef73a0>, self.argstack=[], self.csmap=OrderedDict([('DeviceGray', <PDFColorSpace: DeviceGray, ncomponents=1>), ('CalRGB', <PDFColorSpace: CalRGB, ncomponents=3>), ('CalGray', <PDFColorSpace: CalGray, ncomponents=1>), ('Lab', <PDFColorSpace: Lab, ncomponents=3>), ('DeviceRGB', <PDFColorSpace: DeviceRGB, ncomponents=3>), ('DeviceCMYK', <PDFColorSpace: DeviceCMYK, ncomponents=4>), ('Separation', <PDFColorSpace: Separation, ncomponents=1>), ('Indexed', <PDFColorSpace: Indexed, ncomponents=1>), ('Pattern', <PDFColorSpace: Pattern, ncomponents=1>)]), self.ctm=(1, 0, 0, 1, 0, 0), self.curpath=[], self.device=<PDFDevice>, self.fontmap={'T1_0': <PDFType1Font: basefont='Helvetica'>, 'T1_1': <PDFType1Font: basefont='Helvetica-Bold'>, 'T1_2': <PDFType1Font: basefont='Melior-Bold'>, 'T1_3': <PDFType1Font: basefont='Melior'>, 'T1_4': <PDFType1Font: basefont='Symbol'>, 'T1_5': <PDFType1Font: basefont='Melior-Italic'>}, self.graphicstate=<PDFGraphicState: linewidth=0, linecap=None, linejoin=None,  miterlimit=None, dash=None, intent=None, flatness=None,  stroking color=None, non stroking color=None>, self.gstack=[], self.ncs=<PDFColorSpace: DeviceGray, ncomponents=1>, self.resources={'ExtGState': {'GS0': <PDFObjRef:17>}, 'Font': {'T1_0': <PDFObjRef:56>, 'T1_1': <PDFObjRef:70>, 'T1_2': <PDFObjRef:60>, 'T1_3': <PDFObjRef:65>, 'T1_4': <PDFObjRef:36>, 'T1_5': <PDFObjRef:6>}, 'ProcSet': [/'PDF', /'Text']}, self.rsrcmgr=<pdfminer.pdfinterp.PDFResourceManager object at 0x7f1a47ef77f0>, self.scs=<PDFColorSpace: DeviceGray, ncomponents=1>, self.textstate=<PDFTextState: font=None, fontsize=0, charspace=0, wordspace=0, scaling=100, leading=0, render=0, rise=0, matrix=(1, 0, 0, 1, 0, 0), linematrix=(0, 0)>, self.xobjmap={})

[((1, 0, 0, 1, 0, 0), <PDFTextState: font=None, fontsize=0, charspace=0, wordspace=0, scaling=100, leading=0, render=0, rise=0, matrix=(1, 0, 0, 1, 0, 0), linematrix=(0, 0)>, <PDFGraphicState: linewidth=0, linecap=None, linejoin=None,  miterlimit=None, dash=None, intent=None, flatness=None,  stroking color=None, non stroking color=None>)]


def do_w(self, linewidth: PDFStackT) -> None:
        self.graphicstate.linewidth = cast(float, linewidth)
        return
do_w(self=<pdfminer.pdfinterp.PDFPageInterpreter object at 0x7f1a47ef73a0>, linewidth=2.2, self.argstack=[], self.csmap=OrderedDict([('DeviceGray', <PDFColorSpace: DeviceGray, ncomponents=1>), ('CalRGB', <PDFColorSpace: CalRGB, ncomponents=3>), ('CalGray', <PDFColorSpace: CalGray, ncomponents=1>), ('Lab', <PDFColorSpace: Lab, ncomponents=3>), ('DeviceRGB', <PDFColorSpace: DeviceRGB, ncomponents=3>), ('DeviceCMYK', <PDFColorSpace: DeviceCMYK, ncomponents=4>), ('Separation', <PDFColorSpace: Separation, ncomponents=1>), ('Indexed', <PDFColorSpace: Indexed, ncomponents=1>), ('Pattern', <PDFColorSpace: Pattern, ncomponents=1>)]), self.ctm=(1, 0, 0, 1, 45, 744), self.curpath=[], self.device=<PDFDevice>, self.fontmap={'T1_0': <PDFType1Font: basefont='Helvetica'>, 'T1_1': <PDFType1Font: basefont='Helvetica-Bold'>, 'T1_2': <PDFType1Font: basefont='Melior-Bold'>, 'T1_3': <PDFType1Font: basefont='Melior'>, 'T1_4': <PDFType1Font: basefont='Symbol'>, 'T1_5': <PDFType1Font: basefont='Melior-Italic'>}, self.graphicstate=<PDFGraphicState: linewidth=0, linecap=None, linejoin=None,  miterlimit=None, dash=None, intent=None, flatness=None,  stroking color=None, non stroking color=None>, self.gstack=[((1, 0, 0, 1, 0, 0), <PDFTextState: font=None, fontsize=0, charspace=0, wordspace=0, scaling=100, leading=0, render=0, rise=0, matrix=(1, 0, 0, 1, 0, 0), linematrix=(0, 0)>, <PDFGraphicState: linewidth=0, linecap=None, linejoin=None,  miterlimit=None, dash=None, intent=None, flatness=None,  stroking color=None, non stroking color=None>)], self.ncs=<PDFColorSpace: DeviceGray, ncomponents=1>, self.resources={'ExtGState': {'GS0': <PDFObjRef:17>}, 'Font': {'T1_0': <PDFObjRef:56>, 'T1_1': <PDFObjRef:70>, 'T1_2': <PDFObjRef:60>, 'T1_3': <PDFObjRef:65>, 'T1_4': <PDFObjRef:36>, 'T1_5': <PDFObjRef:6>}, 'ProcSet': [/'PDF', /'Text']}, self.rsrcmgr=<pdfminer.pdfinterp.PDFResourceManager object at 0x7f1a47ef77f0>, self.scs=<PDFColorSpace: DeviceGray, ncomponents=1>, self.textstate=<PDFTextState: font=None, fontsize=0, charspace=0, wordspace=0, scaling=100, leading=0, render=0, rise=0, matrix=(1, 0, 0, 1, 0, 0), linematrix=(0, 0)>, self.xobjmap={})

<PDFGraphicState: linewidth=2.2, linecap=None, linejoin=None,  miterlimit=None, dash=None, intent=None, flatness=None,  stroking color=None, non stroking color=None>


def do_l(self, x: PDFStackT, y: PDFStackT) -> None:
        self.curpath.append(("l", cast(float, x), cast(float, y)))
        return
do_l(self=<pdfminer.pdfinterp.PDFPageInterpreter object at 0x7f1a47ef73a0>, x=522, y=0, self.argstack=[], self.csmap=OrderedDict([('DeviceGray', <PDFColorSpace: DeviceGray, ncomponents=1>), ('CalRGB', <PDFColorSpace: CalRGB, ncomponents=3>), ('CalGray', <PDFColorSpace: CalGray, ncomponents=1>), ('Lab', <PDFColorSpace: Lab, ncomponents=3>), ('DeviceRGB', <PDFColorSpace: DeviceRGB, ncomponents=3>), ('DeviceCMYK', <PDFColorSpace: DeviceCMYK, ncomponents=4>), ('Separation', <PDFColorSpace: Separation, ncomponents=1>), ('Indexed', <PDFColorSpace: Indexed, ncomponents=1>), ('Pattern', <PDFColorSpace: Pattern, ncomponents=1>)]), self.ctm=(1, 0, 0, 1, 45, 744), self.curpath=[('m', 0, 0)], self.device=<PDFDevice>, self.fontmap={'T1_0': <PDFType1Font: basefont='Helvetica'>, 'T1_1': <PDFType1Font: basefont='Helvetica-Bold'>, 'T1_2': <PDFType1Font: basefont='Melior-Bold'>, 'T1_3': <PDFType1Font: basefont='Melior'>, 'T1_4': <PDFType1Font: basefont='Symbol'>, 'T1_5': <PDFType1Font: basefont='Melior-Italic'>}, self.graphicstate=<PDFGraphicState: linewidth=2.2, linecap=None, linejoin=None,  miterlimit=None, dash=None, intent=None, flatness=None,  stroking color=None, non stroking color=None>, self.gstack=[((1, 0, 0, 1, 0, 0), <PDFTextState: font=None, fontsize=0, charspace=0, wordspace=0, scaling=100, leading=0, render=0, rise=0, matrix=(1, 0, 0, 1, 0, 0), linematrix=(0, 0)>, <PDFGraphicState: linewidth=0, linecap=None, linejoin=None,  miterlimit=None, dash=None, intent=None, flatness=None,  stroking color=None, non stroking color=None>)], self.ncs=<PDFColorSpace: DeviceGray, ncomponents=1>, self.resources={'ExtGState': {'GS0': <PDFObjRef:17>}, 'Font': {'T1_0': <PDFObjRef:56>, 'T1_1': <PDFObjRef:70>, 'T1_2': <PDFObjRef:60>, 'T1_3': <PDFObjRef:65>, 'T1_4': <PDFObjRef:36>, 'T1_5': <PDFObjRef:6>}, 'ProcSet': [/'PDF', /'Text']}, self.rsrcmgr=<pdfminer.pdfinterp.PDFResourceManager object at 0x7f1a47ef77f0>, self.scs=<PDFColorSpace: DeviceGray, ncomponents=1>, self.textstate=<PDFTextState: font=None, fontsize=0, charspace=0, wordspace=0, scaling=100, leading=0, render=0, rise=0, matrix=(1, 0, 0, 1, 0, 0), linematrix=(0, 0)>, self.xobjmap={})


def do_S(self) -> None:
        self.device.paint_path(self.graphicstate, True, False, False, self.curpath)
        self.curpath = []
        return
do_S(self=<pdfminer.pdfinterp.PDFPageInterpreter object at 0x7f1a47ef73a0>, self.argstack=[], self.csmap=OrderedDict([('DeviceGray', <PDFColorSpace: DeviceGray, ncomponents=1>), ('CalRGB', <PDFColorSpace: CalRGB, ncomponents=3>), ('CalGray', <PDFColorSpace: CalGray, ncomponents=1>), ('Lab', <PDFColorSpace: Lab, ncomponents=3>), ('DeviceRGB', <PDFColorSpace: DeviceRGB, ncomponents=3>), ('DeviceCMYK', <PDFColorSpace: DeviceCMYK, ncomponents=4>), ('Separation', <PDFColorSpace: Separation, ncomponents=1>), ('Indexed', <PDFColorSpace: Indexed, ncomponents=1>), ('Pattern', <PDFColorSpace: Pattern, ncomponents=1>)]), self.ctm=(1, 0, 0, 1, 45, 744), self.curpath=[('m', 0, 0), ('l', 522, 0)], self.device=<PDFDevice>, self.fontmap={'T1_0': <PDFType1Font: basefont='Helvetica'>, 'T1_1': <PDFType1Font: basefont='Helvetica-Bold'>, 'T1_2': <PDFType1Font: basefont='Melior-Bold'>, 'T1_3': <PDFType1Font: basefont='Melior'>, 'T1_4': <PDFType1Font: basefont='Symbol'>, 'T1_5': <PDFType1Font: basefont='Melior-Italic'>}, self.graphicstate=<PDFGraphicState: linewidth=2.2, linecap=None, linejoin=None,  miterlimit=None, dash=None, intent=None, flatness=None,  stroking color=None, non stroking color=None>, self.gstack=[((1, 0, 0, 1, 0, 0), <PDFTextState: font=None, fontsize=0, charspace=0, wordspace=0, scaling=100, leading=0, render=0, rise=0, matrix=(1, 0, 0, 1, 0, 0), linematrix=(0, 0)>, <PDFGraphicState: linewidth=0, linecap=None, linejoin=None,  miterlimit=None, dash=None, intent=None, flatness=None,  stroking color=None, non stroking color=None>)], self.ncs=<PDFColorSpace: DeviceGray, ncomponents=1>, self.resources={'ExtGState': {'GS0': <PDFObjRef:17>}, 'Font': {'T1_0': <PDFObjRef:56>, 'T1_1': <PDFObjRef:70>, 'T1_2': <PDFObjRef:60>, 'T1_3': <PDFObjRef:65>, 'T1_4': <PDFObjRef:36>, 'T1_5': <PDFObjRef:6>}, 'ProcSet': [/'PDF', /'Text']}, self.rsrcmgr=<pdfminer.pdfinterp.PDFResourceManager object at 0x7f1a47ef77f0>, self.scs=<PDFColorSpace: DeviceGray, ncomponents=1>, self.textstate=<PDFTextState: font=None, fontsize=0, charspace=0, wordspace=0, scaling=100, leading=0, render=0, rise=0, matrix=(1, 0, 0, 1, 0, 0), linematrix=(0, 0)>, self.xobjmap={})


def do_Q(self) -> None:
        if self.gstack:
            self.set_current_state(self.gstack.pop())
        return
do_Q(self=<pdfminer.pdfinterp.PDFPageInterpreter object at 0x7f1a47ef73a0>, self.argstack=[], self.csmap=OrderedDict([('DeviceGray', <PDFColorSpace: DeviceGray, ncomponents=1>), ('CalRGB', <PDFColorSpace: CalRGB, ncomponents=3>), ('CalGray', <PDFColorSpace: CalGray, ncomponents=1>), ('Lab', <PDFColorSpace: Lab, ncomponents=3>), ('DeviceRGB', <PDFColorSpace: DeviceRGB, ncomponents=3>), ('DeviceCMYK', <PDFColorSpace: DeviceCMYK, ncomponents=4>), ('Separation', <PDFColorSpace: Separation, ncomponents=1>), ('Indexed', <PDFColorSpace: Indexed, ncomponents=1>), ('Pattern', <PDFColorSpace: Pattern, ncomponents=1>)]), self.ctm=(1, 0, 0, 1, 45, 744), self.curpath=[], self.device=<PDFDevice>, self.fontmap={'T1_0': <PDFType1Font: basefont='Helvetica'>, 'T1_1': <PDFType1Font: basefont='Helvetica-Bold'>, 'T1_2': <PDFType1Font: basefont='Melior-Bold'>, 'T1_3': <PDFType1Font: basefont='Melior'>, 'T1_4': <PDFType1Font: basefont='Symbol'>, 'T1_5': <PDFType1Font: basefont='Melior-Italic'>}, self.graphicstate=<PDFGraphicState: linewidth=2.2, linecap=None, linejoin=None,  miterlimit=None, dash=None, intent=None, flatness=None,  stroking color=None, non stroking color=None>, self.gstack=[((1, 0, 0, 1, 0, 0), <PDFTextState: font=None, fontsize=0, charspace=0, wordspace=0, scaling=100, leading=0, render=0, rise=0, matrix=(1, 0, 0, 1, 0, 0), linematrix=(0, 0)>, <PDFGraphicState: linewidth=0, linecap=None, linejoin=None,  miterlimit=None, dash=None, intent=None, flatness=None,  stroking color=None, non stroking color=None>)], self.ncs=<PDFColorSpace: DeviceGray, ncomponents=1>, self.resources={'ExtGState': {'GS0': <PDFObjRef:17>}, 'Font': {'T1_0': <PDFObjRef:56>, 'T1_1': <PDFObjRef:70>, 'T1_2': <PDFObjRef:60>, 'T1_3': <PDFObjRef:65>, 'T1_4': <PDFObjRef:36>, 'T1_5': <PDFObjRef:6>}, 'ProcSet': [/'PDF', /'Text']}, self.rsrcmgr=<pdfminer.pdfinterp.PDFResourceManager object at 0x7f1a47ef77f0>, self.scs=<PDFColorSpace: DeviceGray, ncomponents=1>, self.textstate=<PDFTextState: font=None, fontsize=0, charspace=0, wordspace=0, scaling=100, leading=0, render=0, rise=0, matrix=(1, 0, 0, 1, 0, 0), linematrix=(0, 0)>, self.xobjmap={})


def do_Tf(self, fontid: PDFStackT, fontsize: PDFStackT) -> None:
        try:
            self.textstate.font = self.fontmap[literal_name(fontid)]
        except KeyError:
            if settings.STRICT:
                raise PDFInterpreterError("Undefined Font id: %r" % fontid)
            self.textstate.font = self.rsrcmgr.get_font(None, {})
        self.textstate.fontsize = cast(float, fontsize)
        return
do_Tf(self=<pdfminer.pdfinterp.PDFPageInterpreter object at 0x7f1a47ef73a0>, fontid=/'T1_0', fontsize=1, self.argstack=[], self.csmap=OrderedDict([('DeviceGray', <PDFColorSpace: DeviceGray, ncomponents=1>), ('CalRGB', <PDFColorSpace: CalRGB, ncomponents=3>), ('CalGray', <PDFColorSpace: CalGray, ncomponents=1>), ('Lab', <PDFColorSpace: Lab, ncomponents=3>), ('DeviceRGB', <PDFColorSpace: DeviceRGB, ncomponents=3>), ('DeviceCMYK', <PDFColorSpace: DeviceCMYK, ncomponents=4>), ('Separation', <PDFColorSpace: Separation, ncomponents=1>), ('Indexed', <PDFColorSpace: Indexed, ncomponents=1>), ('Pattern', <PDFColorSpace: Pattern, ncomponents=1>)]), self.ctm=(1, 0, 0, 1, 0, 0), self.curpath=[], self.device=<PDFDevice>, self.fontmap={'T1_0': <PDFType1Font: basefont='Helvetica'>, 'T1_1': <PDFType1Font: basefont='Helvetica-Bold'>, 'T1_2': <PDFType1Font: basefont='Melior-Bold'>, 'T1_3': <PDFType1Font: basefont='Melior'>, 'T1_4': <PDFType1Font: basefont='Symbol'>, 'T1_5': <PDFType1Font: basefont='Melior-Italic'>}, self.graphicstate=<PDFGraphicState: linewidth=0, linecap=None, linejoin=None,  miterlimit=None, dash=None, intent=None, flatness=None,  stroking color=None, non stroking color=None>, self.gstack=[], self.ncs=<PDFColorSpace: DeviceGray, ncomponents=1>, self.resources={'ExtGState': {'GS0': <PDFObjRef:17>}, 'Font': {'T1_0': <PDFObjRef:56>, 'T1_1': <PDFObjRef:70>, 'T1_2': <PDFObjRef:60>, 'T1_3': <PDFObjRef:65>, 'T1_4': <PDFObjRef:36>, 'T1_5': <PDFObjRef:6>}, 'ProcSet': [/'PDF', /'Text']}, self.rsrcmgr=<pdfminer.pdfinterp.PDFResourceManager object at 0x7f1a47ef77f0>, self.scs=<PDFColorSpace: DeviceGray, ncomponents=1>, self.textstate=<PDFTextState: font=None, fontsize=0, charspace=0, wordspace=0, scaling=100, leading=0, render=0, rise=0, matrix=(1, 0, 0, 1, 0, 0), linematrix=(0, 0)>, self.xobjmap={})

<PDFTextState: font=<PDFType1Font: basefont='Helvetica'>, fontsize=0, charspace=0, wordspace=0, scaling=100, leading=0, render=0, rise=0, matrix=(1, 0, 0, 1, 0, 0), linematrix=(0, 0)>

<PDFTextState: font=<PDFType1Font: basefont='Helvetica'>, fontsize=1, charspace=0, wordspace=0, scaling=100, leading=0, render=0, rise=0, matrix=(1, 0, 0, 1, 0, 0), linematrix=(0, 0)>


def do_Tj(self, s: PDFStackT) -> None:
        self.do_TJ([s])
        return
do_Tj(self=<pdfminer.pdfinterp.PDFPageInterpreter object at 0x7f1a47ef73a0>, s=b'This section of the FEDERAL REGISTER', self.argstack=[], self.csmap=OrderedDict([('DeviceGray', <PDFColorSpace: DeviceGray, ncomponents=1>), ('CalRGB', <PDFColorSpace: CalRGB, ncomponents=3>), ('CalGray', <PDFColorSpace: CalGray, ncomponents=1>), ('Lab', <PDFColorSpace: Lab, ncomponents=3>), ('DeviceRGB', <PDFColorSpace: DeviceRGB, ncomponents=3>), ('DeviceCMYK', <PDFColorSpace: DeviceCMYK, ncomponents=4>), ('Separation', <PDFColorSpace: Separation, ncomponents=1>), ('Indexed', <PDFColorSpace: Indexed, ncomponents=1>), ('Pattern', <PDFColorSpace: Pattern, ncomponents=1>)]), self.ctm=(1, 0, 0, 1, 0, 0), self.curpath=[], self.device=<PDFDevice>, self.fontmap={'T1_0': <PDFType1Font: basefont='Helvetica'>, 'T1_1': <PDFType1Font: basefont='Helvetica-Bold'>, 'T1_2': <PDFType1Font: basefont='Melior-Bold'>, 'T1_3': <PDFType1Font: basefont='Melior'>, 'T1_4': <PDFType1Font: basefont='Symbol'>, 'T1_5': <PDFType1Font: basefont='Melior-Italic'>}, self.graphicstate=<PDFGraphicState: linewidth=0, linecap=None, linejoin=None,  miterlimit=None, dash=None, intent=None, flatness=None,  stroking color=None, non stroking color=None>, self.gstack=[], self.ncs=<PDFColorSpace: DeviceGray, ncomponents=1>, self.resources={'ExtGState': {'GS0': <PDFObjRef:17>}, 'Font': {'T1_0': <PDFObjRef:56>, 'T1_1': <PDFObjRef:70>, 'T1_2': <PDFObjRef:60>, 'T1_3': <PDFObjRef:65>, 'T1_4': <PDFObjRef:36>, 'T1_5': <PDFObjRef:6>}, 'ProcSet': [/'PDF', /'Text']}, self.rsrcmgr=<pdfminer.pdfinterp.PDFResourceManager object at 0x7f1a47ef77f0>, self.scs=<PDFColorSpace: DeviceGray, ncomponents=1>, self.textstate=<PDFTextState: font=<PDFType1Font: basefont='Helvetica'>, fontsize=1, charspace=0, wordspace=0.055, scaling=100, leading=0, render=0, rise=0, matrix=(8, 0, 0, 8, 45, 663), linematrix=(0, 0)>, self.xobjmap={})

<PDFTextState: font=<PDFType1Font: basefont='Helvetica'>, fontsize=1, charspace=0, wordspace=0.055, scaling=100, leading=0, render=0, rise=0, matrix=(8, 0, 0, 8, 45, 663), linematrix=(18.670000000000005, 0)>


def do_TJ(self, seq: PDFStackT) -> None:
        if self.textstate.font is None:
            if settings.STRICT:
                raise PDFInterpreterError("No font specified!")
            return
        assert self.ncs is not None
        self.device.render_string(
            self.textstate, cast(PDFTextSeq, seq), self.ncs, self.graphicstate.copy()
        )
        return
do_TJ(self=<pdfminer.pdfinterp.PDFPageInterpreter object at 0x7f1a47ef73a0>, seq=[b'This section of the FEDERAL REGISTER'], self.argstack=[], self.csmap=OrderedDict([('DeviceGray', <PDFColorSpace: DeviceGray, ncomponents=1>), ('CalRGB', <PDFColorSpace: CalRGB, ncomponents=3>), ('CalGray', <PDFColorSpace: CalGray, ncomponents=1>), ('Lab', <PDFColorSpace: Lab, ncomponents=3>), ('DeviceRGB', <PDFColorSpace: DeviceRGB, ncomponents=3>), ('DeviceCMYK', <PDFColorSpace: DeviceCMYK, ncomponents=4>), ('Separation', <PDFColorSpace: Separation, ncomponents=1>), ('Indexed', <PDFColorSpace: Indexed, ncomponents=1>), ('Pattern', <PDFColorSpace: Pattern, ncomponents=1>)]), self.ctm=(1, 0, 0, 1, 0, 0), self.curpath=[], self.device=<PDFDevice>, self.fontmap={'T1_0': <PDFType1Font: basefont='Helvetica'>, 'T1_1': <PDFType1Font: basefont='Helvetica-Bold'>, 'T1_2': <PDFType1Font: basefont='Melior-Bold'>, 'T1_3': <PDFType1Font: basefont='Melior'>, 'T1_4': <PDFType1Font: basefont='Symbol'>, 'T1_5': <PDFType1Font: basefont='Melior-Italic'>}, self.graphicstate=<PDFGraphicState: linewidth=0, linecap=None, linejoin=None,  miterlimit=None, dash=None, intent=None, flatness=None,  stroking color=None, non stroking color=None>, self.gstack=[], self.ncs=<PDFColorSpace: DeviceGray, ncomponents=1>, self.resources={'ExtGState': {'GS0': <PDFObjRef:17>}, 'Font': {'T1_0': <PDFObjRef:56>, 'T1_1': <PDFObjRef:70>, 'T1_2': <PDFObjRef:60>, 'T1_3': <PDFObjRef:65>, 'T1_4': <PDFObjRef:36>, 'T1_5': <PDFObjRef:6>}, 'ProcSet': [/'PDF', /'Text']}, self.rsrcmgr=<pdfminer.pdfinterp.PDFResourceManager object at 0x7f1a47ef77f0>, self.scs=<PDFColorSpace: DeviceGray, ncomponents=1>, self.textstate=<PDFTextState: font=<PDFType1Font: basefont='Helvetica'>, fontsize=1, charspace=0, wordspace=0.055, scaling=100, leading=0, render=0, rise=0, matrix=(8, 0, 0, 8, 45, 663), linematrix=(0, 0)>, self.xobjmap={})


def do_TD(self, tx: PDFStackT, ty: PDFStackT) -> None:
        tx = cast(float, tx)
        ty = cast(float, ty)
        (a, b, c, d, e, f) = self.textstate.matrix
        self.textstate.matrix = (a, b, c, d, tx * a + ty * c + e, tx * b + ty * d + f)
        self.textstate.leading = ty
        self.textstate.linematrix = (0, 0)
        return
do_TD(self=<pdfminer.pdfinterp.PDFPageInterpreter object at 0x7f1a47ef73a0>, tx=0, ty=-1.125, self.argstack=[], self.csmap=OrderedDict([('DeviceGray', <PDFColorSpace: DeviceGray, ncomponents=1>), ('CalRGB', <PDFColorSpace: CalRGB, ncomponents=3>), ('CalGray', <PDFColorSpace: CalGray, ncomponents=1>), ('Lab', <PDFColorSpace: Lab, ncomponents=3>), ('DeviceRGB', <PDFColorSpace: DeviceRGB, ncomponents=3>), ('DeviceCMYK', <PDFColorSpace: DeviceCMYK, ncomponents=4>), ('Separation', <PDFColorSpace: Separation, ncomponents=1>), ('Indexed', <PDFColorSpace: Indexed, ncomponents=1>), ('Pattern', <PDFColorSpace: Pattern, ncomponents=1>)]), self.ctm=(1, 0, 0, 1, 0, 0), self.curpath=[], self.device=<PDFDevice>, self.fontmap={'T1_0': <PDFType1Font: basefont='Helvetica'>, 'T1_1': <PDFType1Font: basefont='Helvetica-Bold'>, 'T1_2': <PDFType1Font: basefont='Melior-Bold'>, 'T1_3': <PDFType1Font: basefont='Melior'>, 'T1_4': <PDFType1Font: basefont='Symbol'>, 'T1_5': <PDFType1Font: basefont='Melior-Italic'>}, self.graphicstate=<PDFGraphicState: linewidth=0, linecap=None, linejoin=None,  miterlimit=None, dash=None, intent=None, flatness=None,  stroking color=None, non stroking color=None>, self.gstack=[], self.ncs=<PDFColorSpace: DeviceGray, ncomponents=1>, self.resources={'ExtGState': {'GS0': <PDFObjRef:17>}, 'Font': {'T1_0': <PDFObjRef:56>, 'T1_1': <PDFObjRef:70>, 'T1_2': <PDFObjRef:60>, 'T1_3': <PDFObjRef:65>, 'T1_4': <PDFObjRef:36>, 'T1_5': <PDFObjRef:6>}, 'ProcSet': [/'PDF', /'Text']}, self.rsrcmgr=<pdfminer.pdfinterp.PDFResourceManager object at 0x7f1a47ef77f0>, self.scs=<PDFColorSpace: DeviceGray, ncomponents=1>, self.textstate=<PDFTextState: font=<PDFType1Font: basefont='Helvetica'>, fontsize=1, charspace=0, wordspace=0.055, scaling=100, leading=0, render=0, rise=0, matrix=(8, 0, 0, 8, 45, 663), linematrix=(18.670000000000005, 0)>, self.xobjmap={})

<PDFTextState: font=<PDFType1Font: basefont='Helvetica'>, fontsize=1, charspace=0, wordspace=0.055, scaling=100, leading=0, render=0, rise=0, matrix=(8, 0, 0, 8, 45.0, 654.0), linematrix=(18.670000000000005, 0)>

<PDFTextState: font=<PDFType1Font: basefont='Helvetica'>, fontsize=1, charspace=0, wordspace=0.055, scaling=100, leading=-1.125, render=0, rise=0, matrix=(8, 0, 0, 8, 45.0, 654.0), linematrix=(18.670000000000005, 0)>

<PDFTextState: font=<PDFType1Font: basefont='Helvetica'>, fontsize=1, charspace=0, wordspace=0.055, scaling=100, leading=-1.125, render=0, rise=0, matrix=(8, 0, 0, 8, 45.0, 654.0), linematrix=(0, 0)>


self.textstate.matrix = (a, b, c, d, tx * a + ty * c + e, tx * b + ty * d + f)

<PDFTextState: font=<PDFType1Font: basefont='Helvetica'>, fontsize=1, charspace=0, wordspace=0.055, scaling=100, leading=0, render=0, rise=0, matrix=(8, 0, 0, 8, 45.0, 654.0), linematrix=(18.670000000000005, 0)>


<PDFTextState: font=<PDFType1Font: basefont='Helvetica'>, fontsize=1, charspace=0, wordspace=0.055, scaling=100, leading=-1.125, render=0, rise=0, matrix=(8, 0, 0, 8, 45.0, 654.0), linematrix=(18.670000000000005, 0)>


<PDFTextState: font=<PDFType1Font: basefont='Helvetica'>, fontsize=1, charspace=0, wordspace=0.055, scaling=100, leading=-1.125, render=0, rise=0, matrix=(8, 0, 0, 8, 45.0, 654.0), linematrix=(0, 0)>


def do_T_a(self) -> None:
        (a, b, c, d, e, f) = self.textstate.matrix
        self.textstate.matrix = (
            a,
            b,
            c,
            d,
            self.textstate.leading * c + e,
            self.textstate.leading * d + f,
        )
        self.textstate.linematrix = (0, 0)
        return
do_T_a(self=<pdfminer.pdfinterp.PDFPageInterpreter object at 0x7f1a47ef73a0>, self.argstack=[], self.csmap=OrderedDict([('DeviceGray', <PDFColorSpace: DeviceGray, ncomponents=1>), ('CalRGB', <PDFColorSpace: CalRGB, ncomponents=3>), ('CalGray', <PDFColorSpace: CalGray, ncomponents=1>), ('Lab', <PDFColorSpace: Lab, ncomponents=3>), ('DeviceRGB', <PDFColorSpace: DeviceRGB, ncomponents=3>), ('DeviceCMYK', <PDFColorSpace: DeviceCMYK, ncomponents=4>), ('Separation', <PDFColorSpace: Separation, ncomponents=1>), ('Indexed', <PDFColorSpace: Indexed, ncomponents=1>), ('Pattern', <PDFColorSpace: Pattern, ncomponents=1>)]), self.ctm=(1, 0, 0, 1, 0, 0), self.curpath=[], self.device=<PDFDevice>, self.fontmap={'T1_0': <PDFType1Font: basefont='Helvetica'>, 'T1_1': <PDFType1Font: basefont='Helvetica-Bold'>, 'T1_2': <PDFType1Font: basefont='Melior-Bold'>, 'T1_3': <PDFType1Font: basefont='Melior'>, 'T1_4': <PDFType1Font: basefont='Symbol'>, 'T1_5': <PDFType1Font: basefont='Melior-Italic'>}, self.graphicstate=<PDFGraphicState: linewidth=0, linecap=None, linejoin=None,  miterlimit=None, dash=None, intent=None, flatness=None,  stroking color=None, non stroking color=None>, self.gstack=[], self.ncs=<PDFColorSpace: DeviceGray, ncomponents=1>, self.resources={'ExtGState': {'GS0': <PDFObjRef:17>}, 'Font': {'T1_0': <PDFObjRef:56>, 'T1_1': <PDFObjRef:70>, 'T1_2': <PDFObjRef:60>, 'T1_3': <PDFObjRef:65>, 'T1_4': <PDFObjRef:36>, 'T1_5': <PDFObjRef:6>}, 'ProcSet': [/'PDF', /'Text']}, self.rsrcmgr=<pdfminer.pdfinterp.PDFResourceManager object at 0x7f1a47ef77f0>, self.scs=<PDFColorSpace: DeviceGray, ncomponents=1>, self.textstate=<PDFTextState: font=<PDFType1Font: basefont='Helvetica'>, fontsize=1, charspace=0, wordspace=0.055, scaling=100, leading=-1.125, render=0, rise=0, matrix=(8, 0, 0, 8, 45.0, 654.0), linematrix=(20.45200000000001, 0)>, self.xobjmap={})

<PDFTextState: font=<PDFType1Font: basefont='Helvetica'>, fontsize=1, charspace=0, wordspace=0.055, scaling=100, leading=-1.125, render=0, rise=0, matrix=(8, 0, 0, 8, 45.0, 645.0), linematrix=(20.45200000000001, 0)>

<PDFTextState: font=<PDFType1Font: basefont='Helvetica'>, fontsize=1, charspace=0, wordspace=0.055, scaling=100, leading=-1.125, render=0, rise=0, matrix=(8, 0, 0, 8, 45.0, 645.0), linematrix=(0, 0)>


<PDFTextState: font=<PDFType1Font: basefont='Helvetica'>, fontsize=1, charspace=0, wordspace=0.055, scaling=100, leading=-1.125, render=0, rise=0, matrix=(8, 0, 0, 8, 45.0, 645.0), linematrix=(20.45200000000001, 0)>


def do_Td(self, tx: PDFStackT, ty: PDFStackT) -> None:
        tx = cast(float, tx)
        ty = cast(float, ty)
        (a, b, c, d, e, f) = self.textstate.matrix
        self.textstate.matrix = (a, b, c, d, tx * a + ty * c + e, tx * b + ty * d + f)
        self.textstate.linematrix = (0, 0)
        return
do_Td(self=<pdfminer.pdfinterp.PDFPageInterpreter object at 0x7f1a47ef73a0>, tx=0.607, ty=0, self.argstack=[], self.csmap=OrderedDict([('DeviceGray', <PDFColorSpace: DeviceGray, ncomponents=1>), ('CalRGB', <PDFColorSpace: CalRGB, ncomponents=3>), ('CalGray', <PDFColorSpace: CalGray, ncomponents=1>), ('Lab', <PDFColorSpace: Lab, ncomponents=3>), ('DeviceRGB', <PDFColorSpace: DeviceRGB, ncomponents=3>), ('DeviceCMYK', <PDFColorSpace: DeviceCMYK, ncomponents=4>), ('Separation', <PDFColorSpace: Separation, ncomponents=1>), ('Indexed', <PDFColorSpace: Indexed, ncomponents=1>), ('Pattern', <PDFColorSpace: Pattern, ncomponents=1>)]), self.ctm=(1, 0, 0, 1, 0, 0), self.curpath=[], self.device=<PDFDevice>, self.fontmap={'T1_0': <PDFType1Font: basefont='Helvetica'>, 'T1_1': <PDFType1Font: basefont='Helvetica-Bold'>, 'T1_2': <PDFType1Font: basefont='Melior-Bold'>, 'T1_3': <PDFType1Font: basefont='Melior'>, 'T1_4': <PDFType1Font: basefont='Symbol'>, 'T1_5': <PDFType1Font: basefont='Melior-Italic'>}, self.graphicstate=<PDFGraphicState: linewidth=0, linecap=None, linejoin=None,  miterlimit=None, dash=None, intent=None, flatness=None,  stroking color=None, non stroking color=None>, self.gstack=[], self.ncs=<PDFColorSpace: DeviceGray, ncomponents=1>, self.resources={'ExtGState': {'GS0': <PDFObjRef:17>}, 'Font': {'T1_0': <PDFObjRef:56>, 'T1_1': <PDFObjRef:70>, 'T1_2': <PDFObjRef:60>, 'T1_3': <PDFObjRef:65>, 'T1_4': <PDFObjRef:36>, 'T1_5': <PDFObjRef:6>}, 'ProcSet': [/'PDF', /'Text']}, self.rsrcmgr=<pdfminer.pdfinterp.PDFResourceManager object at 0x7f1a47ef77f0>, self.scs=<PDFColorSpace: DeviceGray, ncomponents=1>, self.textstate=<PDFTextState: font=<PDFType1Font: basefont='Melior'>, fontsize=1, charspace=0, wordspace=-0.0044, scaling=100, leading=-1.111, render=0, rise=0, matrix=(9, 0, 0, 9, 75.8023, 456.3001), linematrix=(0.611, 0)>, self.xobjmap={})

<PDFTextState: font=<PDFType1Font: basefont='Melior'>, fontsize=1, charspace=0, wordspace=-0.0044, scaling=100, leading=-1.111, render=0, rise=0, matrix=(9, 0, 0, 9, 81.2653, 456.3001), linematrix=(0.611, 0)>

<PDFTextState: font=<PDFType1Font: basefont='Melior'>, fontsize=1, charspace=0, wordspace=-0.0044, scaling=100, leading=-1.111, render=0, rise=0, matrix=(9, 0, 0, 9, 81.2653, 456.3001), linematrix=(0, 0)>


<PDFTextState: font=<PDFType1Font: basefont='Melior'>, fontsize=1, charspace=0, wordspace=-0.0044, scaling=100, leading=-1.111, render=0, rise=0, matrix=(9, 0, 0, 9, 81.2653, 456.3001), linematrix=(0.611, 0)>


<PDFTextState: font=<PDFType1Font: basefont='Melior'>, fontsize=1, charspace=0, wordspace=-0.0044, scaling=100, leading=-1.111, render=0, rise=0, matrix=(9, 0, 0, 9, 81.2653, 456.3001), linematrix=(0, 0)>


def step(self, action):
        state = self.state
        action = np.clip(action, self.action_space.low, self.action_space.high)
        self.state = next_state = self._transition_fn(self.state, action)
        next_obs = self._get_obs(next_state)
        reward = self._reward_fn(state, action, next_state)
        done = self._terminal(next_state)
        return next_obs, reward, done, {}
step(self=<gym_cartpole_swingup.envs.cartpole_swingup.CartPoleSwingUpV0 object at 0x7ff1730d73d0>, action=array([-0.09395223], dtype=float32), self._np_random=Generator(PCG64) at 0x7FF1730609E0, self.action_space=Box(-1.0, 1.0, (1,), float32), self.observation_space=Box(-3.4028235e+38, 3.4028235e+38, (5,), float32), self.params=CartPoleSwingUpParams(gravity=9.82, forcemag=10.0, deltat=0.01, friction=0.1, x_threshold=2.4, cart=CartParams(width=0.3333333333333333, height=0.16666666666666666, mass=0.5), pole=PoleParams(width=0.05, length=0.6, mass=0.5), masstotal=1.0, mpl=0.3), self.spec=EnvSpec(id='CartPoleSwingUp-v0', entry_point='gym_cartpole_swingup.envs.cartpole_swingup:CartPoleSwingUpV0', reward_threshold=None, nondeterministic=False, max_episode_steps=500, order_enforce=True, autoreset=False, disable_env_checker=False, apply_api_compatibility=False, kwargs={}, namespace=None, name='CartPoleSwingUp', version=0), self.state=State(x_pos=0.18573049, x_dot=-0.062929064, theta=3.3186514, theta_dot=0.23617047), self.viewer=None)


self.state = next_state = self._transition_fn(self.state, action)


reward = self._reward_fn(state, action, next_state)


def _transition_fn(self, state, action):
        action = action[0] * self.params.forcemag
        sin_theta = np.sin(state.theta)
        cos_theta = np.cos(state.theta)
        xdot_update = (
            -2 * self.params.mpl * (state.theta_dot ** 2) * sin_theta
            + 3 * self.params.pole.mass * self.params.gravity * sin_theta * cos_theta
            + 4 * action
            - 4 * self.params.friction * state.x_dot
        ) / (4 * self.params.masstotal - 3 * self.params.pole.mass * cos_theta ** 2)
        thetadot_update = (
            -3 * self.params.mpl * (state.theta_dot ** 2) * sin_theta * cos_theta
            + 6 * self.params.masstotal * self.params.gravity * sin_theta
            + 6 * (action - self.params.friction * state.x_dot) * cos_theta
        ) / (
            4 * self.params.pole.length * self.params.masstotal
            - 3 * self.params.mpl * cos_theta ** 2
        )
        delta_t = self.params.deltat
        return State(
            x_pos=state.x_pos + state.x_dot * delta_t,
            theta=state.theta + state.theta_dot * delta_t,
            x_dot=state.x_dot + xdot_update * delta_t,
            theta_dot=state.theta_dot + thetadot_update * delta_t,
        )
_transition_fn(self=<gym_cartpole_swingup.envs.cartpole_swingup.CartPoleSwingUpV0 object at 0x7ff1730d73d0>, state=State(x_pos=0.18573049, x_dot=-0.062929064, theta=3.3186514, theta_dot=0.23617047), action=array([-0.09395223], dtype=float32), self._np_random=Generator(PCG64) at 0x7FF1730609E0, self.action_space=Box(-1.0, 1.0, (1,), float32), self.observation_space=Box(-3.4028235e+38, 3.4028235e+38, (5,), float32), self.params=CartPoleSwingUpParams(gravity=9.82, forcemag=10.0, deltat=0.01, friction=0.1, x_threshold=2.4, cart=CartParams(width=0.3333333333333333, height=0.16666666666666666, mass=0.5), pole=PoleParams(width=0.05, length=0.6, mass=0.5), masstotal=1.0, mpl=0.3), self.spec=EnvSpec(id='CartPoleSwingUp-v0', entry_point='gym_cartpole_swingup.envs.cartpole_swingup:CartPoleSwingUpV0', reward_threshold=None, nondeterministic=False, max_episode_steps=500, order_enforce=True, autoreset=False, disable_env_checker=False, apply_api_compatibility=False, kwargs={}, namespace=None, name='CartPoleSwingUp', version=0), self.state=State(x_pos=0.18573049, x_dot=-0.062929064, theta=3.3186514, theta_dot=0.23617047), self.viewer=None)


def convert_type(ty, default=None):
    guessed_type = False
    if ty is None and default is not None:
        if isinstance(default, tuple):
            ty = tuple(map(type, default))
        else:
            ty = type(default)
        guessed_type = True
    if isinstance(ty, tuple):
        return Tuple(ty)
    if isinstance(ty, ParamType):
        return ty
    if ty is text_type or ty is str or ty is None:
        return STRING
    if ty is int:
        return INT
    if ty is bool and not guessed_type:
        return BOOL
    if ty is float:
        return FLOAT
    if guessed_type:
        return STRING
    if __debug__:
        try:
            if issubclass(ty, ParamType):
                raise AssertionError('Attempted to use an uninstantiated '
                                     'parameter type (%s).' % ty)
        except TypeError:
            pass
    return FuncParamType(ty)
convert_type(ty=None, default=None)


def _make_command(f, name, attrs, cls):
    if isinstance(f, Command):
        raise TypeError('Attempted to convert a callback into a '
                        'command twice.')
    try:
        params = f.__click_params__
        params.reverse()
        del f.__click_params__
    except AttributeError:
        params = []
    help = attrs.get('help')
    if help is None:
        help = inspect.getdoc(f)
        if isinstance(help, bytes):
            help = help.decode('utf-8')
    else:
        help = inspect.cleandoc(help)
    attrs['help'] = help
    _check_for_unicode_literals()
    return cls(name=name or f.__name__.lower(),
               callback=f, params=params, **attrs)
_make_command(f=<function test_nargs_star.<locals>.copy at 0x7fe6e94318b0>, name=None, attrs={}, cls=<class 'click.core.Command'>)

[<click.core.Argument object at 0x7fe6e966a610>, <click.core.Argument object at 0x7fe6e966a940>]

[<click.core.Argument object at 0x7fe6e966a940>, <click.core.Argument object at 0x7fe6e966a610>]


def _bashcomplete(cmd, prog_name, complete_var=None):
    if complete_var is None:
        complete_var = '_%s_COMPLETE' % (prog_name.replace('-', '_')).upper()
    complete_instr = os.environ.get(complete_var)
    if not complete_instr:
        return
    from ._bashcomplete import bashcomplete
    if bashcomplete(cmd, prog_name, complete_var, complete_instr):
        sys.exit(1)
_bashcomplete(cmd={name='copy', context_settings={}, params=[<click.core.Argument object at 0x7fe6e966a940>, <click.core.Argument object at 0x7fe6e966a610>], help=None, epilog=None, options_metavar='[OPTIONS]', short_help=None, add_help_option=True, __doc__=None}, prog_name='copy', complete_var=None)


def __enter__(self):
        self._depth += 1
        push_context(self)
        return self
__enter__(self=<click.core.Context object at 0x7fe6e93bae50>, self._close_callbacks=[], self._depth=1, self._meta={}, self.allow_extra_args=False, self.allow_interspersed_args=True, self.args=[], self.auto_envvar_prefix=None, self.color=None, self.command=<click.core.Command object at 0x7fe6e92e0ac0>, self.default_map=None, self.help_option_names=['--help'], self.ignore_unknown_options=False, self.info_name='copy', self.invoked_subcommand=None, self.max_content_width=None, self.obj=None, self.params={}, self.parent=None, self.protected_args=[], self.resilient_parsing=False, self.terminal_width=None, self.token_normalize_func=None)


def get_params(self, ctx):
        rv = self.params
        help_option = self.get_help_option(ctx)
        if help_option is not None:
            rv = rv + [help_option]
        return rv
get_params(self=<click.core.Command object at 0x7fe6e92e0ac0>, ctx={parent=None, command=<click.core.Command object at 0x7fe6e92e0ac0>, info_name='copy', params={}, args=[], protected_args=[], obj=None, _meta={}, default_map=None, invoked_subcommand=None, terminal_width=None, max_content_width=None, allow_extra_args=False, allow_interspersed_args=True, ignore_unknown_options=False, help_option_names=['--help'], token_normalize_func=None, resilient_parsing=False, auto_envvar_prefix=None, color=None, _close_callbacks=[], _depth=2}, self.__doc__=None, self.add_help_option=True, self.callback=<function test_nargs_star.<locals>.copy at 0x7fe6e94318b0>, self.context_settings={}, self.epilog=None, self.help=None, self.name='copy', self.options_metavar='[OPTIONS]', self.params=[<click.core.Argument object at 0x7fe6e966a940>, <click.core.Argument object at 0x7fe6e966a610>], self.short_help=None)

{name='help', opts=['--help'], secondary_opts=[], type=BOOL, required=False, nargs=1, multiple=False, expose_value=False, default=False, is_eager=True, metavar=None, envvar=None, prompt=None, confirmation_prompt=False, hide_input=False, is_flag=True, flag_value=True, is_bool_flag=True, count=False, allow_from_autoenv=True, help='Show this message and exit.', show_default=False}

[<click.core.Argument object at 0x7fe6e966a940>, <click.core.Argument object at 0x7fe6e966a610>, <click.core.Option object at 0x7fe6e93bad60>]


def _parse_decls(self, decls, expose_value):
        opts = []
        secondary_opts = []
        name = None
        possible_names = []
        for decl in decls:
            if isidentifier(decl):
                if name is not None:
                    raise TypeError('Name defined twice')
                name = decl
            else:
                split_char = decl[:1] == '/' and ';' or '/'
                if split_char in decl:
                    first, second = decl.split(split_char, 1)
                    first = first.rstrip()
                    if first:
                        possible_names.append(split_opt(first))
                        opts.append(first)
                    second = second.lstrip()
                    if second:
                        secondary_opts.append(second.lstrip())
                else:
                    possible_names.append(split_opt(decl))
                    opts.append(decl)
        if name is None and possible_names:
            possible_names.sort(key=lambda x: len(x[0]))
            name = possible_names[-1][1].replace('-', '_').lower()
            if not isidentifier(name):
                name = None
        if name is None:
            if not expose_value:
                return None, opts, secondary_opts
            raise TypeError('Could not determine name for option')
        if not opts and not secondary_opts:
            raise TypeError('No options defined but a name was passed (%s). '
                            'Did you mean to declare an argument instead '
                            'of an option?' % name)
        return name, opts, secondary_opts
_parse_decls(self=<click.core.Option object at 0x7fe6e93bad60>, decls={'--help'}, expose_value=False)


def normalize_opt(opt, ctx):
    if ctx is None or ctx.token_normalize_func is None:
        return opt
    prefix, opt = split_opt(opt)
    return prefix + ctx.token_normalize_func(opt)
normalize_opt(opt='--foo', ctx={parent=None, command=<click.core.Command object at 0x7fe6e9373070>, info_name='cli', params={}, args=[], protected_args=[], obj=None, _meta={}, default_map=None, invoked_subcommand=None, terminal_width=None, max_content_width=None, allow_extra_args=False, allow_interspersed_args=True, ignore_unknown_options=False, help_option_names=['--help'], resilient_parsing=False, auto_envvar_prefix=None, color=None, _close_callbacks=[], _depth=2})


def _unpack_args(args, nargs_spec):
    args = deque(args)
    nargs_spec = deque(nargs_spec)
    rv = []
    spos = None
    def _fetch(c):
        try:
            if spos is None:
                return c.popleft()
            else:
                return c.pop()
        except IndexError:
            return None
    while nargs_spec:
        nargs = _fetch(nargs_spec)
        if nargs == 1:
            rv.append(_fetch(args))
        elif nargs > 1:
            x = [_fetch(args) for _ in range(nargs)]
            if spos is not None:
                x.reverse()
            rv.append(tuple(x))
        elif nargs < 0:
            if spos is not None:
                raise TypeError('Cannot have two nargs < 0')
            spos = len(rv)
            rv.append(None)
    if spos is not None:
        rv[spos] = tuple(args)
        args = []
        rv[spos + 1:] = reversed(rv[spos + 1:])
    return tuple(rv), list(args)
_unpack_args(args=['foo.txt', 'bar.txt', 'dir'], nargs_spec=[-1, 1])

<function _unpack_args.<locals>._fetch at 0x7fe6e9431b80>


def _fetch(c):
        try:
            if spos is None:
                return c.popleft()
            else:
                return c.pop()
        except IndexError:
            return None
_fetch(c=deque([-1, 1]), spos=None)


def handle_parse_result(self, ctx, opts, args):
        with augment_usage_errors(ctx, param=self):
            value = self.consume_value(ctx, opts)
            try:
                value = self.full_process_value(ctx, value)
            except Exception:
                if not ctx.resilient_parsing:
                    raise
                value = None
            if self.callback is not None:
                try:
                    value = invoke_param_callback(
                        self.callback, ctx, self, value)
                except Exception:
                    if not ctx.resilient_parsing:
                        raise
        if self.expose_value:
            ctx.params[self.name] = value
        return value, args
handle_parse_result(self=<click.core.Option object at 0x7fe6e93ba190>, ctx={parent=None, command=<click.core.Command object at 0x7fe6e92e0ac0>, info_name='copy', params={}, args=[], protected_args=[], obj=None, _meta={}, default_map=None, invoked_subcommand=None, terminal_width=None, max_content_width=None, allow_extra_args=False, allow_interspersed_args=True, ignore_unknown_options=False, help_option_names=['--help'], token_normalize_func=None, resilient_parsing=False, auto_envvar_prefix=None, color=None, _close_callbacks=[], _depth=2}, opts={'src': ('foo.txt', 'bar.txt'), 'dst': 'dir'}, args=[], self.allow_from_autoenv=True, self.callback=<function Command.get_help_option.<locals>.show_help at 0x7fe6e9431b80>, self.confirmation_prompt=False, self.count=False, self.default=False, self.envvar=None, self.expose_value=False, self.flag_value=True, self.help='Show this message and exit.', self.hide_input=False, self.is_bool_flag=True, self.is_eager=True, self.is_flag=True, self.metavar=None, self.multiple=False, self.name='help', self.nargs=1, self.opts=['--help'], self.prompt=None, self.required=False, self.secondary_opts=[], self.show_default=False, self.type=BOOL)


value = self.full_process_value(ctx, value)


def consume_value(self, ctx, opts):
        value = opts.get(self.name)
        if value is None:
            value = ctx.lookup_default(self.name)
        if value is None:
            value = self.value_from_envvar(ctx)
        return value
consume_value(self=<click.core.Option object at 0x7fe6e93ba190>, ctx={parent=None, command=<click.core.Command object at 0x7fe6e92e0ac0>, info_name='copy', params={}, args=[], protected_args=[], obj=None, _meta={}, default_map=None, invoked_subcommand=None, terminal_width=None, max_content_width=None, allow_extra_args=False, allow_interspersed_args=True, ignore_unknown_options=False, help_option_names=['--help'], token_normalize_func=None, resilient_parsing=False, auto_envvar_prefix=None, color=None, _close_callbacks=[], _depth=2}, opts={'src': ('foo.txt', 'bar.txt'), 'dst': 'dir'}, self.allow_from_autoenv=True, self.callback=<function Command.get_help_option.<locals>.show_help at 0x7fe6e9431b80>, self.confirmation_prompt=False, self.count=False, self.default=False, self.envvar=None, self.expose_value=False, self.flag_value=True, self.help='Show this message and exit.', self.hide_input=False, self.is_bool_flag=True, self.is_eager=True, self.is_flag=True, self.metavar=None, self.multiple=False, self.name='help', self.nargs=1, self.opts=['--help'], self.prompt=None, self.required=False, self.secondary_opts=[], self.show_default=False, self.type=BOOL)


def get_default(self, ctx):
        if callable(self.default):
            rv = self.default()
        else:
            rv = self.default
        return self.type_cast_value(ctx, rv)
get_default(self=<click.core.Option object at 0x7fe6e93ba190>, ctx={parent=None, command=<click.core.Command object at 0x7fe6e92e0ac0>, info_name='copy', params={}, args=[], protected_args=[], obj=None, _meta={}, default_map=None, invoked_subcommand=None, terminal_width=None, max_content_width=None, allow_extra_args=False, allow_interspersed_args=True, ignore_unknown_options=False, help_option_names=['--help'], token_normalize_func=None, resilient_parsing=False, auto_envvar_prefix=None, color=None, _close_callbacks=[], _depth=2}, self.allow_from_autoenv=True, self.callback=<function Command.get_help_option.<locals>.show_help at 0x7fe6e9431b80>, self.confirmation_prompt=False, self.count=False, self.default=False, self.envvar=None, self.expose_value=False, self.flag_value=True, self.help='Show this message and exit.', self.hide_input=False, self.is_bool_flag=True, self.is_eager=True, self.is_flag=True, self.metavar=None, self.multiple=False, self.name='help', self.nargs=1, self.opts=['--help'], self.prompt=None, self.required=False, self.secondary_opts=[], self.show_default=False, self.type=BOOL)


def exit(self, code=0):
        sys.exit(code)
exit(self=<click.core.Context object at 0x7fe6e9340940>, code=0, self._close_callbacks=[], self._depth=1, self._meta={}, self.allow_extra_args=False, self.allow_interspersed_args=True, self.args=[], self.auto_envvar_prefix=None, self.color=None, self.command=<click.core.Command object at 0x7fe6e94bee20>, self.default_map=None, self.help_option_names=['--help'], self.ignore_unknown_options=False, self.info_name='cli', self.invoked_subcommand=None, self.max_content_width=None, self.obj=None, self.params={'arg': ((1, 2), (3, 4))}, self.parent=None, self.protected_args=[], self.resilient_parsing=False, self.terminal_width=None, self.token_normalize_func=None)


def func():
        stream = src_func()
        try:
            rv = cache.get(stream)
        except Exception:
            rv = None
        if rv is not None:
            return rv
        rv = wrapper_func()
        try:
            cache[stream] = rv
        except Exception:
            pass
        return rv
func(cache=<WeakKeyDictionary at 0x7fe6e9750670>, src_func=<function <lambda> at 0x7fe6e9735160>, wrapper_func=<function get_text_stdout at 0x7fe6e97574c0>)


def format_usage(self, ctx, formatter):
        pieces = self.collect_usage_pieces(ctx)
        formatter.write_usage(ctx.command_path, ' '.join(pieces))
format_usage(self=<click.core.Command object at 0x7fe6e9465040>, ctx={parent=None, command=<click.core.Command object at 0x7fe6e9465040>, info_name='copy', params={'x': 'foo'}, args=[], protected_args=[], obj=None, _meta={}, default_map=None, invoked_subcommand=None, terminal_width=None, max_content_width=None, allow_extra_args=False, allow_interspersed_args=True, ignore_unknown_options=False, help_option_names=['--help'], token_normalize_func=None, resilient_parsing=False, auto_envvar_prefix=None, color=None, _close_callbacks=[], _depth=0}, formatter={indent_increment=2, width=80, current_indent=0, buffer=[]}, self.__doc__=None, self.add_help_option=True, self.callback=<function test_nargs_err.<locals>.copy at 0x7fe6e8acf040>, self.context_settings={}, self.epilog=None, self.help=None, self.name='copy', self.options_metavar='[OPTIONS]', self.params=[<click.core.Argument object at 0x7fe6e9465af0>], self.short_help=None)

{indent_increment=2, width=80, current_indent=0, buffer=['Usage: copy [OPTIONS] X', '\n']}


{indent_increment=2, width=80, current_indent=0, buffer=['Usage: copy [OPTIONS] X', '\n']}


def collect_usage_pieces(self, ctx):
        rv = [self.options_metavar]
        for param in self.get_params(ctx):
            rv.extend(param.get_usage_pieces(ctx))
        return rv
collect_usage_pieces(self=<click.core.Command object at 0x7fe6e9465040>, ctx={parent=None, command=<click.core.Command object at 0x7fe6e9465040>, info_name='copy', params={'x': 'foo'}, args=[], protected_args=[], obj=None, _meta={}, default_map=None, invoked_subcommand=None, terminal_width=None, max_content_width=None, allow_extra_args=False, allow_interspersed_args=True, ignore_unknown_options=False, help_option_names=['--help'], token_normalize_func=None, resilient_parsing=False, auto_envvar_prefix=None, color=None, _close_callbacks=[], _depth=0}, self.__doc__=None, self.add_help_option=True, self.callback=<function test_nargs_err.<locals>.copy at 0x7fe6e8acf040>, self.context_settings={}, self.epilog=None, self.help=None, self.name='copy', self.options_metavar='[OPTIONS]', self.params=[<click.core.Argument object at 0x7fe6e9465af0>], self.short_help=None)

{name='x', opts=['x'], secondary_opts=[], type=STRING, required=True, callback=None, nargs=1, multiple=False, expose_value=True, default=None, is_eager=False, metavar=None, envvar=None}

{name='help', opts=['--help'], secondary_opts=[], type=BOOL, required=False, nargs=1, multiple=False, expose_value=False, default=False, is_eager=True, metavar=None, envvar=None, prompt=None, confirmation_prompt=False, hide_input=False, is_flag=True, flag_value=True, is_bool_flag=True, count=False, allow_from_autoenv=True, help='Show this message and exit.', show_default=False}


def write_usage(self, prog, args='', prefix='Usage: '):
        usage_prefix = '%*s%s ' % (self.current_indent, prefix, prog)
        text_width = self.width - self.current_indent
        if text_width >= (term_len(usage_prefix) + 20):
            indent = ' ' * term_len(usage_prefix)
            self.write(wrap_text(args, text_width,
                                 initial_indent=usage_prefix,
                                 subsequent_indent=indent))
        else:
            self.write(usage_prefix)
            self.write('\n')
            indent = ' ' * (max(self.current_indent, term_len(prefix)) + 4)
            self.write(wrap_text(args, text_width,
                                 initial_indent=indent,
                                 subsequent_indent=indent))
        self.write('\n')
write_usage(self=<click.formatting.HelpFormatter object at 0x7fe6e942f760>, prog='copy', args='[OPTIONS] X', prefix='Usage: ', self.buffer=[], self.current_indent=0, self.indent_increment=2, self.width=80)


def _process_opts(self, arg, state):
        explicit_value = None
        if '=' in arg:
            long_opt, explicit_value = arg.split('=', 1)
        else:
            long_opt = arg
        norm_long_opt = normalize_opt(long_opt, self.ctx)
        try:
            self._match_long_opt(norm_long_opt, explicit_value, state)
        except NoSuchOption:
            if arg[:2] not in self._opt_prefixes:
                return self._match_short_opt(arg, state)
            if not self.ignore_unknown_options:
                raise
            state.largs.append(arg)
_process_opts(self=<click.parser.OptionParser object at 0x7fe6e92cb340>, arg='-f', state={opts={}, largs=[], rargs=['-x', '--', '-foo', 'bar'], order=[]}, self._args=[<click.parser.Argument object at 0x7fe6e92cbf40>], self._long_opt={'--help': <click.parser.Option object at 0x7fe6e9373250>}, self._opt_prefixes={'--', '-'}, self._short_opt={'-f': <click.parser.Option object at 0x7fe6e9373310>}, self.allow_interspersed_args=True, self.ctx=<click.core.Context object at 0x7fe6e92cb4f0>, self.ignore_unknown_options=False)

{opts={'f': '-x'}, largs=[], rargs=['--', '-foo', 'bar'], order=[<click.core.Option object at 0x7fe6e92cb370>]}


def _convert(value, level):
            if level == 0:
                return self.type(value, self, ctx)
            return tuple(_convert(x, level - 1) for x in value or ())
_convert(value='bar', level=0, _convert=<function Parameter.type_cast_value.<locals>._convert at 0x7fe6e3fe7e50>, ctx={parent=None, command=<click.core.Command object at 0x7fe6e966a370>, info_name='cli', params={}, args=[], protected_args=[], obj=None, _meta={}, default_map=None, invoked_subcommand=None, terminal_width=None, max_content_width=None, allow_extra_args=False, allow_interspersed_args=True, ignore_unknown_options=False, help_option_names=['--help'], token_normalize_func=None, resilient_parsing=False, auto_envvar_prefix=None, color=None, _close_callbacks=[], _depth=2}, self=<click.core.Option object at 0x7fe6e966a040>, self.allow_from_autoenv=True, self.callback=None, self.confirmation_prompt=False, self.count=False, self.default=42, self.envvar=None, self.expose_value=True, self.flag_value=False, self.help=None, self.hide_input=False, self.is_bool_flag=False, self.is_eager=False, self.is_flag=False, self.metavar=None, self.multiple=False, self.name='foo', self.nargs=1, self.opts=['--foo'], self.prompt=None, self.required=False, self.secondary_opts=[], self.show_default=False, self.type=INT)


def _process_args_for_args(self, state):
        pargs, args = _unpack_args(state.largs + state.rargs,
                                   [x.nargs for x in self._args])
        for idx, arg in enumerate(self._args):
            arg.process(pargs[idx], state)
        state.largs = args
        state.rargs = []
_process_args_for_args(self=<click.parser.OptionParser object at 0x7fe6e93707f0>, state={opts={}, largs=[], rargs=[], order=[]}, self._args=[], self._long_opt={'--local-opt': <click.parser.Option object at 0x7fe6e93703d0>, '--help': <click.parser.Option object at 0x7fe6e9370400>}, self._opt_prefixes={'--', '-'}, self._short_opt={}, self.allow_interspersed_args=True, self.ctx=<click.core.Context object at 0x7fe6e9370580>, self.ignore_unknown_options=False)


def add_command(self, cmd, name=None):
        name = name or cmd.name
        if name is None:
            raise TypeError('Command has no name.')
        _check_multicommand(self, name, cmd, register=True)
        self.commands[name] = cmd
add_command(self=<click.core.Group object at 0x7fe6e9370190>, cmd={name='sub', context_settings={}, params=[<click.core.Option object at 0x7fe6e9370670>], help=None, epilog=None, options_metavar='[OPTIONS]', short_help=None, add_help_option=True, __doc__=None}, name=None, self.__doc__=None, self.add_help_option=True, self.callback=<function test_small_chain.<locals>.cli at 0x7fe6e6b9b0d0>, self.chain=False, self.commands={}, self.context_settings={}, self.epilog=None, self.help=None, self.invoke_without_command=False, self.name='cli', self.no_args_is_help=True, self.options_metavar='[OPTIONS]', self.params=[<click.core.Option object at 0x7fe6e9370e50>], self.result_callback=None, self.short_help=None, self.subcommand_metavar='COMMAND [ARGS]...')

{'sub': <click.core.Command object at 0x7fe6e9370df0>}


def make_default_short_help(help, max_length=45):
    words = help.split()
    total_length = 0
    result = []
    done = False
    for word in words:
        if word[-1:] == '.':
            done = True
        new_length = result and 1 + len(word) or len(word)
        if total_length + new_length > max_length:
            result.append('...')
            done = True
        else:
            if result:
                result.append(' ')
            result.append(word)
        if done:
            break
        total_length += new_length
    return ''.join(result)
make_default_short_help(help='Hello World!', max_length=45)


def format_help_text(self, ctx, formatter):
        if self.help:
            formatter.write_paragraph()
            with formatter.indentation():
                formatter.write_text(self.help)
format_help_text(self=<click.core.Command object at 0x7fe6e9373a60>, ctx={parent=None, command=<click.core.Command object at 0x7fe6e9373a60>, info_name='cli', params={}, args=[], protected_args=[], obj=None, _meta={}, default_map=None, invoked_subcommand=None, terminal_width=None, max_content_width=None, allow_extra_args=False, allow_interspersed_args=True, ignore_unknown_options=False, help_option_names=['--help'], token_normalize_func=None, resilient_parsing=False, auto_envvar_prefix=None, color=None, _close_callbacks=[], _depth=2}, formatter={indent_increment=2, width=80, current_indent=0, buffer=['Usage: cli [OPTIONS]', '\n']}, self.__doc__='Hello World!', self.add_help_option=True, self.callback=<function test_basic_functionality.<locals>.cli at 0x7fe6e7860310>, self.context_settings={}, self.epilog=None, self.help='Hello World!', self.name='cli', self.options_metavar='[OPTIONS]', self.params=[], self.short_help='Hello World!')

{indent_increment=2, width=80, current_indent=2, buffer=['Usage: cli [OPTIONS]', '\n', '\n']}

{indent_increment=2, width=80, current_indent=0, buffer=['Usage: cli [OPTIONS]', '\n', '\n']}

{indent_increment=2, width=80, current_indent=0, buffer=['Usage: cli [OPTIONS]', '\n', '\n', '  Hello World!', '\n']}


{indent_increment=2, width=80, current_indent=0, buffer=['Usage: cli [OPTIONS]', '\n', '\n', '  Hello World!', '\n']}


def write_paragraph(self):
        if self.buffer:
            self.write('\n')
write_paragraph(self=<click.formatting.HelpFormatter object at 0x7fe6e92cbe50>, self.buffer=['Usage: cli [OPTIONS]', '\n'], self.current_indent=0, self.indent_increment=2, self.width=80)


def dedent(self):
        self.current_indent -= self.indent_increment
dedent(self=<click.formatting.HelpFormatter object at 0x7fe6e92cbe50>, self.buffer=['Usage: cli [OPTIONS]', '\n', '\n', '  Hello World!', '\n'], self.current_indent=2, self.indent_increment=2, self.width=80)