def _check_pandas_index_arguments(index, defaults):
 if (not any((isinstance(index, k) for k in (list, tuple)))):
  index = [index]
 invalid_choices = [e for e in index if (e not in defaults)]
 if invalid_choices:
  options = [', '.join(e) for e in [invalid_choices, defaults]]
  raise ValueError(("[%s] is not an valid option. Valid indexvalues are 'None' or %s" % tuple(options)))

def _check_pandas_index_arguments ( index , defaults ) : if ( not any ( ( isinstance ( index , k ) for k in ( list , tuple ) ) ) ) : index = [ index ] invalid_choices = [ e for e in index if ( e not in defaults ) ] if invalid_choices : options = [ ', ' . join ( e ) for e in [ invalid_choices , defaults ] ] raise ValueError ( ( "[%s] is not an valid option. Valid indexvalues are 'None' or %s" % tuple ( options ) ) )
check pandas index arguments .