input: Write a python function to calculate the soil moisture and irrigation amount.
  assert calculate_soil_moisture(25, 50, "sandy") == 0
  assert calculate_soil_moisture(30, 60, "loamy") == 0
  assert calculate_soil_moisture(35, 70, "clay") == 0
  assert calculate_soil_moisture(10, 30, "sandy") == 4
  assert calculate_soil_moisture(20, 40, "loamy") == 2.0
output: def calculate_soil_moisture(current_moisture, field_capacity, soil_type):
      soil_type_factor = {
          "sandy": 0.2,
          "loamy": 0.1,
          "clay": 0.05
      }
      
      if current_moisture >= field_capacity:
          return 0
      
      moisture_deficit = field_capacity - current_moisture
      irrigation_amount = moisture_deficit * soil_type_factor.get(soil_type, 0)
      
      return irrigation_amount