parameters: (userid)
return_statement: return user
docstring: Get a user by id.
docstring_summary: Get a user by id.
docstring_tokens: Get a user by id .
function: def get_user_by_id(userid):
      '''
      Get a user by id.
      '''
      if isinstance(userid, str):
          userid = uuid.UUID(userid).hex
      user = User.query.filter_by(id = userid).first()
      return user
function_tokens: def get_user_by_id ( userid ) : if isinstance ( userid , str ) : userid = uuid . UUID ( userid ) . hex user = User . query . filter_by ( id = userid ) . first ( ) return user