code: def get_args(click_wrapper):
      """
      Retrieves arguments being passed in from the command-line and applying them to a click command
  
      :param click_wrapper: click context
      :return: list of arguments
      :rtype: list
      """
  
      # Get the options defined on cli
      params = []
      for opt in click_wrapper.params:
          params.extend(opt.opts)
  
      args = sys.argv[1:]
  
      # Reorder the args so that cli options come before
      # subcommand options. This is a click limitation.
      head, tail = [], []
      for a in args:
          if a in params or head and head[-1] in params:
              head.append(a)
          else:
              tail.append(a)
      return head + tail
  
imports: import logging
  import requests
  import socket
  import sys
  from builtins import str
  from datetime import datetime
  import click
  import pkg_resources
  from six import PY3, BytesIO, StringIO, string_types
  from dtale.utils import make_list
label_desc: Use image node_id 7 for calling a global function with example usage: get_args(click_wrapper) and returns: unknown