Implementation of trace norm regression in Python