code: def load_data_by_type(filetype, contents):
      children = []
      _type, payload = contents.split(",")
      if filetype in {"csv", "xlsx", "xls"}:
          children = [load_table(filetype, payload)]
      elif filetype in {"png", "svg"}:
          children = [html.Img(src=contents)]
  
      children += [
          html.Hr(),
          html.Div("Raw Content", id="raw-title"),
          html.Pre(payload, style=pre_style),
      ]
      return html.Div(children)
  
file_path: dash/components/dash-core-components/tests/integration/upload/test_upload_different_file_types.py
imports: import io
  import base64
  import os
  import pytest
  import pandas
  from dash import Dash, Input, Output, dcc, html
  from dash.dash_table import DataTable
label_desc: Use image node_id 2 for calling a global function with example usage: load_data_by_type(filetype, contents) and returns: html