<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_column(self, data, column_name="", inplace=False):
 """ Adds the specified column to this SFrame. The number of elements in the data given must match every other column of the SFrame. If inplace == False (default) this operation does not modify the current SFrame, returning a new SFrame. If inplace == True, this operation modifies the current SFrame, returning self. Parameters data : SArray The 'column' of data. column_name : string The name of the column. If no name is given, a default name is chosen. inplace : bool, optional. Defaults to False. Whether the SFrame is modified in place. """

        # Check type for pandas dataframe or SArray?
        if not isinstance(data, SArray):
            raise TypeError("Must give column as SArray")
        if not isinstance(column_name, str):
            raise TypeError("Invalid column name: must be str")

        if inplace:
            self.__is_dirty__ = True
            with cython_context():
                if self._is_vertex_frame():
                    graph_proxy = self.__graph__.__proxy__.add_vertex_field(data.__proxy__, column_name)
                    self.__graph__.__proxy__ = graph_proxy
                elif self._is_edge_frame():
                    graph_proxy = self.__graph__.__proxy__.add_edge_field(data.__proxy__, column_name)
                    self.__graph__.__proxy__ = graph_proxy
            return self
        else:
            return super(GFrame, self).add_column(data, column_name, inplace=inplace)