<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def clean_params(self):
 """Retrieves the parameter OrderedDict without the context or self parameters. Useful for inspecting signature. """

        result = self.params.copy()
        if self.cog is not None:
            # first parameter is self
            result.popitem(last=False)

        try:
            # first/second parameter is context
            result.popitem(last=False)
        except Exception:
            raise ValueError('Missing context parameter') from None

        return result