<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _getkey(self, args, kwargs):
 """Get hash key from args and kwargs. args and kwargs must be hashable. :param tuple args: called vargs. :param dict kwargs: called keywords. :return: hash(tuple(args) + tuple((key, val) for key in sorted(kwargs)). :rtype: int."""


        values = list(args)

        keys = sorted(list(kwargs))

        for key in keys:
            values.append((key, kwargs[key]))

        result = hash(tuple(values))

        return result