<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def list_credentials_by_name(type_name):
 """ Prints a list of available credential names for the given type_name. """

  accounts = get_all_external_accounts(api, type_name)
  account_names = [account.name for account in accounts]
  print ("List of credential names for '{0}': [{1}]".format(
    type_name, COMMA_WITH_SPACE.join(map(str, account_names))))