code: def _construct_params(params, required_keys, opt_keys=None):
          
          try:
              params_list = [params.pop(key) for key in required_keys]
          except KeyError as e:
              raise MissingParameter(
                  'Missing expected request parameter: %s' % e)
          if opt_keys:
              params_list.extend([params.pop(key)
                                  for key in opt_keys if key in params])
          return '/'.join(str(p) for p in params_list)
docs: Construct params list in order of given keys.