code: def test_unequal_ohlc_length(self):
      # check: PlotlyError if open, high, low, close are not the same length
      # for TraceFactory.create_ohlc and TraceFactory.create_candlestick
  
      kwargs = {
          "open": [1],
          "high": [1, 3],
          "low": [1, 2],
          "close": [1, 2],
          "direction": ["increasing"],
      }
      self.assertRaises(PlotlyError, ff.create_ohlc, **kwargs)
      self.assertRaises(PlotlyError, ff.create_candlestick, **kwargs)
  
      kwargs = {
          "open": [1, 2],
          "high": [1, 2, 3],
          "low": [1, 2],
          "close": [1, 2],
          "direction": ["decreasing"],
      }
      self.assertRaises(PlotlyError, ff.create_ohlc, **kwargs)
      self.assertRaises(PlotlyError, ff.create_candlestick, **kwargs)
  
      kwargs = {
          "open": [1, 2],
          "high": [2, 3],
          "low": [0],
          "close": [1, 3],
      }
      self.assertRaises(PlotlyError, ff.create_ohlc, **kwargs)
      self.assertRaises(PlotlyError, ff.create_candlestick, **kwargs)
  
      kwargs = {
          "open": [1, 2],
          "high": [2, 3],
          "low": [1, 2],
          "close": [1],
      }
      self.assertRaises(PlotlyError, ff.create_ohlc, **kwargs)
      self.assertRaises(PlotlyError, ff.create_candlestick, **kwargs)
  
imports: import math
  from unittest import TestCase
  import datetime
  import plotly.figure_factory
  import plotly.io
  from plotly.exceptions import PlotlyError
  from plotly.tests.test_optional.optional_utils import NumpyTestUtilsMixin
  from plotly.graph_objs import graph_objs
  from plotly.tests.utils import TestCaseNoTemplate
label_desc: Use image node_id 1 for calling the TestFinanceCharts obj's underlying member method code with example usage: obj.test_unequal_ohlc_length() without return types