<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _get_csv_reader(self, f, dialect):
 		""" 		Returns a csv.reader for the given file handler and csv Dialect named 		tuple. If the file has a header, it already will be gone through. 		Also, if self.ipa_col is not set, an attempt will be made to infer 		which the IPA column is. ValueError would be raised otherwise. 		"""

		reader = csv.reader(f,
					delimiter = dialect.delimiter,
					quotechar = dialect.quotechar,
					doublequote = dialect.doublequote,
					escapechar = dialect.escapechar)

		if self.has_header:
			header = next(reader)
			if not isinstance(self.ipa_col, int):
				self.ipa_col = self._infer_ipa_col(header)

		else:
			if not isinstance(self.ipa_col, int):
				if not self.ipa_col:
					raise ValueError('Cannot infer IPA column without header')

				try:
					self.ipa_col = int(self.ipa_col)
				except ValueError:
					raise ValueError('Cannot find column: {}'.format(self.ipa_col))

		return reader