<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_avg_price_fifo(self) -> Decimal: """ Calculates the average price paid for the security. security = Commodity Returns Decimal value. """

        balance = self.get_quantity()
        if not balance:
            return Decimal(0)

        paid = Decimal(0)
        accounts = self.get_holding_accounts()
        # get unused splits (quantity and total paid) per account.
        for account in accounts:
            splits = self.get_available_splits_for_account(account)

            for split in splits:
                paid += split.value

        avg_price = paid / balance
        return avg_price