input: Write a function to automate the process of calculating and plotting the absorbed power vs emitted power, absorbed power vs reflectivity, and dissipated power vs wavelength based on input data and instructions provided in a separate text file. The function should also calculate thermal resistance and display it on the plot. If the given input data or instructions are empty, the function should return an appropriate error message.
  assert calculate_and_plot("input_data.csv", "instructions.csv")==None
  assert calculate_and_plot("", "instructions.csv")=="Input data file is missing or empty"
  assert calculate_and_plot("input_data.csv", "")=="Instructions file is missing or empty"
output: def calculate_and_plot(input_file, instructions_file):
      if not input_file:
          return "Input data file is missing or empty"
      if not instructions_file:
          return "Instructions file is missing or empty"
      
      import pandas as pd
      import matplotlib.pyplot as plt
  
      input_data = pd.read_csv(input_file)
      instructions = pd.read_csv(instructions_file)
  
      absorbed_power = input_data['absorbed_power']
      emitted_power = input_data['emitted_power']
      reflectivity = input_data['reflectivity']
      dissipated_power = input_data['dissipated_power']
      wavelength = input_data['wavelength']
  
      thermal_resistance = (absorbed_power - emitted_power) / dissipated_power
  
      plt.figure(figsize=(15, 5))
  
      plt.subplot(1, 3, 1)
      plt.plot(absorbed_power, emitted_power)
      plt.xlabel('Absorbed Power')
      plt.ylabel('Emitted Power')
      plt.title('Absorbed Power vs Emitted Power')
  
      plt.subplot(1, 3, 2)
      plt.plot(absorbed_power, reflectivity)
      plt.xlabel('Absorbed Power')
      plt.ylabel('Reflectivity')
      plt.title('Absorbed Power vs Reflectivity')
  
      plt.subplot(1, 3, 3)
      plt.plot(dissipated_power, wavelength)
      plt.xlabel('Dissipated Power')
      plt.ylabel('Wavelength')
      plt.title('Dissipated Power vs Wavelength')
  
      for ax in plt.gcf().axes:
          ax.text(0.05, 0.95, f'Thermal Resistance: {thermal_resistance.mean():.2f}', transform=ax.transAxes, fontsize=10, verticalalignment='top')
  
      plt.tight_layout()
      plt.show()