code: def _createFromObject(obj, *args, **kwargs):
      
      if is_a_sequence(obj):
          return SequenceRti(obj, *args, **kwargs)
      elif is_a_mapping(obj):
          return MappingRti(obj, *args, **kwargs)
      elif is_an_array(obj):
          return ArrayRti(obj, *args, **kwargs)
      elif isinstance(obj, bytearray):
          return ArrayRti(np.array(obj), *args, **kwargs)
      else:
          return ScalarRti(obj, *args, **kwargs)
docs: Creates an RTI given an object. Auto-detects which RTI class to return.
          The *args and **kwargs parameters are passed to the RTI constructor.
          It is therefor important that all memory RTIs accept the same parameters in the
          constructor (with exception of the FieldRti which is not auto-detected).