code: def get_instance_user(instance_id, region=DEFAULT_REGION):
      """
      Get "ubuntu" or "ec2-user" based on AMI used to launch instance
      :param instance_id: Instance ID to be queried
      :param region: Region where query will be performed
      :return: <str> user name
      """
      instance = get_instance_from_id(instance_id, region)
      # Modify here if an AMI other than Ubuntu AMI must be used.
      user = "ubuntu"
      return user
  
imports: import boto3
  import os
  import time
  import re
  from inspect import signature
  import random
  from retrying import retry
  from fabric2 import Connection
  from botocore.config import Config
  from botocore.exceptions import ClientError
  from invoke import run
  from invoke.context import Context
  from .None import DEFAULT_REGION, LOGGER
label_desc: Use image node_id 8 for calling a global function with example usage: get_instance_user(instance_id, region) and returns: user