def _from_row(self, data: TblData, row: int) -> Self:
        """Return a new object with FromColumn replaced with values from row.

        Note that if no FromColumn fields are present, this returns the original object.
        """

        new_fields: dict[str, Any] = {}
        for field in fields(self):
            attr = getattr(self, field.name)
            if isinstance(attr, FromColumn):
                # TODO: could validate that the value fetched from data is allowed.
                # e.g. that color is a string, etc..
                val = _get_cell(data, row, attr.column)

                new_fields[field.name] = attr.fn(val) if attr.fn is not None else val
            elif isinstance(attr, FromValues):
                new_fields[field.name] = attr.values[row]

        if not new_fields:
            return self

        return replace(self, **new_fields)
Return a new object with FromColumn replaced with values from row.

        Note that if no FromColumn fields are present, this returns the original object.
        
great_tables/_styles.py