input: Write a python function to extract job openings from the given JavaScript code and return a dictionary with language names as keys and their respective openings as values.
  assert extract_job_openings('<html><head><title>Job Openings By Language</title></head><body><canvas id="chart"></canvas><script>const ctx = document.getElementById("chart").getContext("2d");const chart = new Chart(ctx, {type: "bar",data: {labels: ["JavaScript", "Python", "C++", "Java"],datasets: [{label: "# of Openings",data: [250, 200, 150, 100],backgroundColor: ["rgba(255, 99, 132, 0.2)","rgba(54, 162, 235, 0.2)","rgba(255, 206, 86, 0.2)","rgba(75, 192, 192, 0.2)"],borderColor: ["rgba(255, 99, 132, 1)","rgba(54, 162, 235, 1)","rgba(255, 206, 86, 1)","rgba(75, 192, 192, 1)"],borderWidth: 1}]},options: {scales: {yAxes: [{ticks: {beginAtZero: true}}]}}});</script></body></html>') == {"JavaScript": 250, "Python": 200, "C++": 150, "Java": 100}
  assert extract_job_openings('<html><head><title>Job Openings By Language</title></head><body><canvas id="chart"></canvas><script>const ctx = document.getElementById("chart").getContext("2d");const chart = new Chart(ctx, {type: "bar",data: {labels: ["Java", "Python"],datasets: [{label: "# of Openings",data: [100, 300],backgroundColor: ["rgba(75, 192, 192, 0.2)","rgba(54, 162, 235, 0.2)"],borderColor: ["rgba(75, 192, 192, 1)","rgba(54, 162, 235, 1)"],borderWidth: 1}]},options: {scales: {yAxes: [{ticks: {beginAtZero: true}}]}}});</script></body></html>') == {"Java": 100, "Python": 300}
output: def extract_job_openings(js_code):
      import re
      from ast import literal_eval
      
      labels_pattern = r'labels: (\[[^\]]+\])'
      data_pattern = r'data: (\[[^\]]+\])'
      
      labels_match = re.search(labels_pattern, js_code)
      data_match = re.search(data_pattern, js_code)
      
      if labels_match and data_match:
          labels = literal_eval(labels_match.group(1))
          data = literal_eval(data_match.group(1))
          
          return dict(zip(labels, data))
      
      return {}