def _format_info(data):
 gecos_field = data.pw_gecos.split(',', 3)
 while (len(gecos_field) < 4):
  gecos_field.append('')
 return {'gid': data.pw_gid, 'groups': list_groups(data.pw_name), 'home': data.pw_dir, 'name': data.pw_name, 'passwd': data.pw_passwd, 'shell': data.pw_shell, 'uid': data.pw_uid, 'fullname': gecos_field[0], 'roomnumber': gecos_field[1], 'workphone': gecos_field[2], 'homephone': gecos_field[3]}

def _format_info ( data ) : gecos_field = data . pw_gecos . split ( ',' , 3 ) while ( len ( gecos_field ) < 4 ) : gecos_field . append ( '' ) return { 'gid' : data . pw_gid , 'groups' : list_groups ( data . pw_name ) , 'home' : data . pw_dir , 'name' : data . pw_name , 'passwd' : data . pw_passwd , 'shell' : data . pw_shell , 'uid' : data . pw_uid , 'fullname' : gecos_field [ 0 ] , 'roomnumber' : gecos_field [ 1 ] , 'workphone' : gecos_field [ 2 ] , 'homephone' : gecos_field [ 3 ] }
return user information in a pretty way .