code: def get_in_out_from_samples(
      mesh, npoints, sample_factor=10, std=0.01
  ):
      """Get in/out point samples from a given mesh.
  
      Args:
        mesh: trimesh mesh. Original mesh to sample points from.
        npoints: int, number of points to sample on the mesh surface.
        sample_factor: int, number of samples to pick per surface point.
        std: float, std of samples to generate.
      Returns:
        surface_samples: [npoints, 6], where first 3 dims are xyz, last 3 dims are
        normals (nx, ny, nz).
      """
      surface_point_samples, fid = mesh.sample(
          int(npoints), return_index=True
      )
      surface_point_normals = mesh.face_normals[fid]
      offsets = np.random.randn(int(npoints), sample_factor, 1) * std
      near_surface_samples = (
          surface_point_samples[:, np.newaxis, :]
          + surface_point_normals[:, np.newaxis, :] * offsets
      )
      near_surface_samples = np.concatenate(
          [near_surface_samples, offsets], axis=-1
      )
      near_surface_samples = near_surface_samples.reshape([-1, 4])
      surface_samples = np.concatenate(
          [surface_point_samples, surface_point_normals], axis=-1
      )
      return surface_samples, near_surface_samples
  
imports: import os
  import numpy
  from skimage import measure
  import tensorflow.compat.v1
  from tensorflow_graphics.projects.local_implicit_grid.core import evaluator
  from tensorflow_graphics.projects.local_implicit_grid.core import local_implicit_grid_layer
  from tensorflow_graphics.projects.local_implicit_grid.core import point_utils
label_desc: Use image node_id 2 for calling a global function with example usage: get_in_out_from_samples(mesh, npoints, sample_factor, std) and returns: surface_samples,  near_surface_samples