def tokenify(cmd, token=None):
 if (token is not None):
  cmd['token'] = token
 return cmd

def tokenify ( cmd , token = None ) : if ( token is not None ) : cmd [ 'token' ] = token return cmd
if token is not none then assign token to token key of cmd dict and return cmd otherwise return cmd .