<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _apply_backwards_compatibility(df):
 """ Attach properties to the Dataframe to make it backwards compatible with older versions of this library :param df: The dataframe to be modified """

    df.row_count = types.MethodType(lambda self: len(self.index), df)
    df.col_count = types.MethodType(lambda self: len(self.columns), df)
    df.dataframe = df