code: def _rewrite_source(self, s):
          
          # While Ansible rewrites the #! using ansible_*_interpreter, it is
          # never actually used to execute the script, instead it is a shell
          # fragment consumed by shell/__init__.py::build_module_command().
          new = [b('#!') + utf8(self.interpreter_fragment)]
          if self.is_python:
              new.append(self.b_ENCODING_STRING)
  
          _, _, rest = bytes_partition(s, b('\n'))
          new.append(rest)
          return b('\n').join(new)
docs: Mutate the source according to the per-task parameters.