code: def _secure_media(self, field_name, value):
      if field_name != "filepath":
          return
  
      new_media_type = fomm.get_media_type(value)
      if self.media_type != new_media_type:
          raise fomm.MediaTypeError(
              "A sample's 'filepath' can be changed, but its media type "
              "cannot; current '%s', new '%s'"
              % (self.media_type, new_media_type)
          )
  
imports: import os
  from bson import ObjectId
  from fiftyone.core.document import Document, DocumentView
  import fiftyone.core.frame
  import fiftyone.core.frame_utils
  import fiftyone.core.labels
  import fiftyone.core.metadata
  import fiftyone.core.media
  import fiftyone.core.odm
  import fiftyone.core.utils
  from fiftyone.core.singletons import SampleSingleton
label_desc: Use image node_id 18 for calling the _SampleMixin obj's underlying member method code with example usage: obj._secure_media(field_name, value) without return types