convert the following perl code to python:
''' perl code:
sub new { \
my $caller = shift; \
my $class = ref $caller || $caller; \
# Create object \
my $self = bless {}, $class; \
$self->name('TreasuryMarginAllocationModel'); \
# Just bless and return \
return $self; \
}
'''