text: Convert the following perl code to python
  CLASS->mk_accessors(@calculated_fields, @input_fields, @other_fields);
  
  sub new {
  my $class  = shift;
  my $params = shift;
  unless (defined $params and defined $params->{name})
  {
  $MY_LOGGER->error('Invalid name specified');
  return undef;
  }
  $class = ref $class || $class;
  my $self = bless {}, $class;
  $self->name($params->{name});
  my $scenarios = {
  "no_spread" => [ 'credit_spread', 'rebate_spread', 'debit_spread', 'gc_short_spread' ],
  "no_borrow" => [ 'etb_rate', 'gc_rate'],
  };
  $self->{_scenarios} = $scenarios;
  return $self;
  }
  
  sub Clone {
  my $self = shift;
  my $clone;
  $clone->{$_} = clone ($self->$_)
  for (@input_fields, @other_fields);
  return bless $clone, CLASS;
  }
  
  sub init {
  my $self   = shift;
  my $object = shift;
  unless ($self->set_object($object))
  {
  $MY_LOGGER->error('Unable init the calculator with the object');
  return +FALSE;
  }
  foreach my $attr (@input_fields)
  {
  eval {
  $self->$attr($object->$attr);
  };
  if($@)
  {
  }
  }
  $self->mk_accessors(@calculated_fields);
  unless ($object->register_attribute($self, \@calculated_fields))
  {
  $MY_LOGGER->error('Failed to register the calculator with object');
  return +FALSE;
  }
  $self->calculation_status(+FALSE);
  $self->calculation_failed(+FALSE);
  return +TRUE;
  }
  
  sub do {
  my $self   = shift;
  my $object = $self->get_object();
  unless(defined $object and defined $self)
  {
  $MY_LOGGER->error('Invalid business object passed');
  return +FALSE;
  }
  $MY_LOGGER->debug("do method called on calculator : " . $self->name .
  " for the object " . $object->key_id()