code: def match_bitwidth(*args, **opt):
      
      # TODO: when we drop 2.7 support, this code should be cleaned up with explicit
      # kwarg support for "signed" rather than the less than helpful "**opt"
      if len(opt) == 0:
          signed = False
      else:
          if len(opt) > 1 or 'signed' not in opt:
              raise PyrtlError('error, only supported kwarg to match_bitwidth is "signed"')
          signed = bool(opt['signed'])
  
      max_len = max(len(wv) for wv in args)
      if signed:
          return (wv.sign_extended(max_len) for wv in args)
      else:
          return (wv.zero_extended(max_len) for wv in args)
docs: Matches the bitwidth of all of the input arguments with zero or sign extend
  
      :param args: WireVectors of which to match bitwidths
      :param opt: Optional keyword argument 'signed=True' (defaults to False)
      :return: tuple of args in order with extended bits
  
      Example of matching the bitwidths of two WireVectors `a` and `b` with
      with zero extention: ::
  
          a,b = match_bitwidth(a, b)
  
      Example of matching the bitwidths of three WireVectors `a`,`b`, and `c` with
      with sign extention: ::
  
          a,b = match_bitwidth(a, b, c, signed=True)