def _get_params(mapper_spec, allowed_keys=None):
 if ('input_reader' not in mapper_spec.params):
  message = "Input reader's parameters should be specified in input_reader subdictionary."
  if allowed_keys:
   raise errors.BadReaderParamsError(message)
  params = mapper_spec.params
  params = dict(((str(n), v) for (n, v) in params.iteritems()))
 else:
  if (not isinstance(mapper_spec.params.get('input_reader'), dict)):
   raise errors.BadReaderParamsError('Input reader parameters should be a dictionary')
  params = mapper_spec.params.get('input_reader')
  params = dict(((str(n), v) for (n, v) in params.iteritems()))
  if allowed_keys:
   params_diff = (set(params.keys()) - allowed_keys)
   if params_diff:
    raise errors.BadReaderParamsError(('Invalid input_reader parameters: %s' % ','.join(params_diff)))
 return params

def _get_params ( mapper_spec , allowed_keys = None ) : if ( 'input_reader' not in mapper_spec . params ) : message = "Input reader's parameters should be specified in input_reader subdictionary." if allowed_keys : raise errors . BadReaderParamsError ( message ) params = mapper_spec . params params = dict ( ( ( str ( n ) , v ) for ( n , v ) in params . iteritems ( ) ) ) else : if ( not isinstance ( mapper_spec . params . get ( 'input_reader' ) , dict ) ) : raise errors . BadReaderParamsError ( 'Input reader parameters should be a dictionary' ) params = mapper_spec . params . get ( 'input_reader' ) params = dict ( ( ( str ( n ) , v ) for ( n , v ) in params . iteritems ( ) ) ) if allowed_keys : params_diff = ( set ( params . keys ( ) ) - allowed_keys ) if params_diff : raise errors . BadReaderParamsError ( ( 'Invalid input_reader parameters: %s' % ',' . join ( params_diff ) ) ) return params
obtain output writer parameters .