code: def get_fastq_2(job, patient_id, sample_type, fastq_1):
      
      prefix, extn = fastq_1, 'temp'
      final_extn = ''
      while extn:
          prefix, extn = os.path.splitext(prefix)
          final_extn = extn + final_extn
          if prefix.endswith('1'):
              prefix = prefix[:-1]
              job.fileStore.logToMaster('"%s" prefix for "%s" determined to be %s'
                                        % (sample_type, patient_id, prefix))
              break
      else:
          raise ParameterError('Could not determine prefix from provided fastq (%s). Is it '
                               'of the form <fastq_prefix>1.[fq/fastq][.gz]?' % fastq_1)
      if final_extn not in ['.fastq', '.fastq.gz', '.fq', '.fq.gz']:
          raise ParameterError('If and _2 fastq path is not specified, only .fastq, .fq or '
                               'their gzippped extensions are accepted. Could not process '
                               '%s:%s.' % (patient_id, sample_type + '_fastq_1'))
      return ''.join([prefix, '2', final_extn])
docs: For a path to a fastq_1 file, return a fastq_2 file with the same prefix and naming scheme.
  
      :param str patient_id: The patient_id
      :param str sample_type: The sample type of the file
      :param str fastq_1: The path to the fastq_1 file
      :return: The path to the fastq_2 file
      :rtype: str