<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def insert(self, loc, column, value, allow_duplicates=False, inplace=False):
 """Insert column into molecule at specified location. Wrapper around the :meth:`pandas.DataFrame.insert` method. """

        out = self if inplace else self.copy()
        out._frame.insert(loc, column, value,
                          allow_duplicates=allow_duplicates)
        if not inplace:
            return out