code: def generate_password(pwd_len=16):
      # List of characters to generate password from.
      # We want to avoid to use similarly looking pairs like
      # (O, 0), (1, l), etc.
      lower_case_letters = "abcdefghijkmnpqrstuvwxyz"
      upper_case_letters = "ABCDEFGHIJKLMPQRSTUVWXYZ"
      digits = "23456789"
  
      # and for punctuation we want to exclude some characters
      # like inverted comma which can be hard to find and/or
      # type
      # change this string if you are supporting an
      # international keyboard with differing keys available
      punctuation = "!#$%&()*+,-./:;<=>?@[\\]^_{|}~"
  
      # we also want to try to have more letters and digits in
      # generated password than punctuation marks
      password_chars = (
          lower_case_letters
          + lower_case_letters
          + upper_case_letters
          + upper_case_letters
          + digits
          + digits
          + punctuation
      )
      pwd = "".join(
          secrets.choice(password_chars) for i in range(pwd_len)
      )
      logger.info(f'Generated password: "{pwd}"')
      return pwd
  
file_path: TabPy/tabpy/utils/tabpy_user.py
imports: import docopt
  import logging
  import secrets
  from tabpy.tabpy_server.app.util import parse_pwd_file
  from tabpy.tabpy_server.handlers.util import hash_password
label_desc: Use image node_id 1 for calling a global function with example usage: generate_password(pwd_len) and returns: pwd