human
Write a function to calculate the sum of the negative numbers of a given list of numbers. Here is a solution in Python: Can you provide a Python code to calculate the sum of the negative numbers of a given list of numbers?
assistant
#Here is Python code to calculate the sum of the negative numbers of a given list of numbers.
 def sum_negativenum(nums):
  sum_negativenum = list(filter(lambda nums:nums<0,nums))
  return sum(sum_negativenum)