code: def get_items_as_list(items, keys, items_names="styles"):
      """
      Returns a dict with an item per key
  
      Parameters:
      -----------
              items : string, list or dict
                      Items (ie line styles)
              keys: list
                      List of keys
              items_names : string
                      Name of items
      """
      if type(items) != dict:
          if type(items) == list:
              if len(items) != len(keys):
                  raise Exception(
                      "List of {0} is not the same length as keys".format(
                          items_names
                      )
                  )
              else:
                  items = dict(zip(keys, items))
          else:
              items = dict(zip(keys, [items] * len(keys)))
      return items
  
imports: import pandas
  import time
  import copy
  import numpy
  from plotly.graph_objs import Figure, Layout, Bar, Box, Scatter, FigureWidget, Scatter3d, Histogram, Heatmap, Surface, Pie
  import plotly.figure_factory
  from collections import defaultdict
  from IPython.display import display, Image
  from .exceptions import CufflinksError
  from .colors import normalize, get_scales, colorgen, to_rgba, get_colorscale
  from .utils import check_kwargs, deep_update, kwargs_from_keyword, is_list
  from .None import tools
  from .None import offline
  from .None import auth
  from .None import ta
label_desc: Use image node_id 6 for calling a global function with example usage: get_items_as_list(items, keys, items_names) and returns: items