code: def invalidTransactions(self, transactions: List[str]) -> List[str]:
      transactions_by_name = {}
  
      for transaction in transactions:
          name, time, amount, city = transaction.split(",")
          if name in transactions_by_name:
              transactions_by_name[name].add((int(time), city))
          else:
              transactions_by_name[name] = {(int(time), city)}
  
      invalid = []
  
      for transaction in transactions:
          name, time, amount, city = transaction.split(",")
          if int(amount) > 1000:
              invalid.append(transaction)
          elif self.isInvalid(
              int(time), city, transactions_by_name[name]
          ):
              invalid.append(
                  transaction
              )  # Only want to append once because it will eventually get to the other transaction and look it up
  
      return invalid
  
label_desc: Use image node_id 1 for calling the Solution obj's underlying member method code with example usage: obj.invalidTransactions(transactions) and returns: invalid