<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def annotate(self, gpl, annotation_column, gpl_on="ID", gsm_on="ID_REF", in_place=False):
 """Annotate GSM with provided GPL Args: gpl (:obj:`pandas.DataFrame`):
 A Platform or DataFrame to annotate with annotation_column (str`):
 Column in a table for annotation gpl_on (:obj:`str`):
 Use this column in GSM to merge. Defaults to "ID". gsm_on (:obj:`str`):
 Use this column in GPL to merge. Defaults to "ID_REF". in_place (:obj:`bool`):
 Substitute table in GSM by new annotated table. Defaults to False. Returns: :obj:`pandas.DataFrame` or :obj:`None`: Annotated table or None Raises: TypeError: GPL should be GPL or pandas.DataFrame """

        if isinstance(gpl, GPL):
            annotation_table = gpl.table
        elif isinstance(gpl, DataFrame):
            annotation_table = gpl
        else:
            raise TypeError("gpl should be a GPL object or a pandas.DataFrame")

        # annotate by merging
        annotated = self.table.merge(
            annotation_table[[gpl_on, annotation_column]], left_on=gsm_on,
            right_on=gpl_on)
        del annotated[gpl_on]
        if in_place:
            self.table = annotated
            return None
        else:
            return annotated