<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def create_header(self):
 		""" return CSP header dict """

		encapsulate =  re.compile("|".join(['^self','^none','^unsafe-inline','^unsafe-eval','^sha[\d]+-[\w=-]+','^nonce-[\w=-]+']))
		csp = {}
		for p,array in self.inputs.items():
			csp[p] = ' '.join(["'%s'" % l if encapsulate.match(l) else l for l in array])

		return {self.header:'; '.join(['%s %s' % (k, v) for k, v in csp.items() if v != ''])}