comefrom: <doocs>1640.Check Array Formation Through Concatenation_1.py
code: def canFormArray( arr: List[int], pieces: List[List[int]]) -> bool:
      mapper = {piece[0]: piece for piece in pieces}
      i, n = 0, len(arr)
      while i < n:
          if arr[i] not in mapper:
              return False
          vals = mapper[arr[i]]
          for val in vals:
              if arr[i] != val:
                  return False
              i += 1
      return True
masked: def sample_funcname ( var_0 : List [ int ] , var_3 : List [ List [ int ] ] ) -> bool :
      var_7 = { var_5 [ 0 ] : var_5 for var_5 in var_3 }
      var_8 , var_10 = 0 , len ( var_0 )
      while var_8 < var_10 :
          if var_0 [ var_8 ] not in var_7 :
              return False
          var_12 = var_7 [ var_0 [ var_8 ] ]
          for var_13 in var_12 :
              if var_0 [ var_8 ] != var_13 :
                  return False
              var_8 += 1
      return True
  