code: def make_variable_handler(dec_f, sized_values, min_size, non_minimal_data_handler):
      
      sized_values = list(sized_values)
  
      def f(script, pc, verify_minimal_data=False):
          size, pc = dec_f(script, pc)
          data = bytes_as_hex(script[pc:pc+size])
          if len(data) < size:
              return pc+1, None
          if verify_minimal_data:
              if size in sized_values or size <= min_size:
                  non_minimal_data_handler("not minimal push of data with size %d" % size)
          return pc+size, data
      return f
docs: Create a handler for a data opcode that returns literal data of a variable size
      that's fetched and decoded by the function dec_f.