def NormalizeUserIdToUri(userid):
  userid = userid.strip()

  # If already in a URI form, we're done:
  if (userid.startswith('http:') or
      userid.startswith('https:') or
      userid.startswith('acct:')):
    return userid

  if userid.find('@') > 0:
    return 'acct:'+userid

  # Catchall:  Guess at http: if nothing else works.
  return 'http://'+userid
Normalizes a user-provided user id to a reasonable guess at a URI.
dataset/ETHPy150Open mimecuvalo/helloworld/packages/magicsig/__init__.py/NormalizeUserIdToUri