<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def run_job(self, job, backend='simulator', shots=1, max_credits=None, seed=None, hub=None, group=None, project=None, hpc=None, access_token=None, user_id=None):
 """ Execute a job """

        if access_token:
            self.req.credential.set_token(access_token)
        if user_id:
            self.req.credential.set_user_id(user_id)
        if not self.check_credentials():
            return {"error": "Not credentials valid"}

        backend_type = self._check_backend(backend, 'job')

        if not backend_type:
            raise BadBackendError(backend)

        if isinstance(job, (list, tuple)):
          qasms = job
          for qasm in qasms:
              qasm['qasm'] = qasm['qasm'].replace('IBMQASM 2.0;', '')
              qasm['qasm'] = qasm['qasm'].replace('OPENQASM 2.0;', '')

          data = {'qasms': qasms,
                  'shots': shots,
                  'backend': {}}

          if max_credits:
            data['maxCredits'] = max_credits

          if seed and len(str(seed)) < 11 and str(seed).isdigit():
              data['seed'] = seed
          elif seed:
              return {"error": "Not seed allowed. Max 10 digits."}

          data['backend']['name'] = backend_type
        elif isinstance(job, dict):
          q_obj = job
          data = {'qObject': q_obj,
                  'backend': {}}

          data['backend']['name'] = backend_type
        else:
          return {"error": "Not a valid data to send"}

        if hpc:
          data['hpc'] = hpc

        url = get_job_url(self.config, hub, group, project)
        
        job = self.req.post(url, data=json.dumps(data))

        return job