def parse_object(response, infotype):
 if (infotype in ('idletime', 'refcount')):
  return int_or_none(response)
 return response

def parse_object ( response , infotype ) : if ( infotype in ( 'idletime' , 'refcount' ) ) : return int_or_none ( response ) return response
parse a string referring to an object .