code: def pop_if(self, ty=None, val=None):
      if self.peek(ty, val):
          return self.pop()
  
imports: import re
  from dataclasses import dataclass, InitVar, field
  from itertools import chain
  from typing import Any, Dict, List, Union, Optional, ClassVar
  import numpy
  from toolz import valfilter, valmap
label_desc: Use image node_id 3 for calling the TokenStream obj's underlying member method code with example usage: obj.pop_if(ty, val) and returns: self