<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def profile_file(self):
 """Return the full path to write the cProfile data :return: str """

        if 'profile' in self._kwargs and self._kwargs['profile']:
            profile_path = path.normpath(self._kwargs['profile'])
            if os.path.exists(profile_path) and os.path.isdir(profile_path):
                return path.join(
                    profile_path, '{}-{}.prof'.format(
                        os.getpid(), self._kwargs['consumer_name']))