limit the source space to a certain distance from the sensor

Hello, I only have a few sensors, and I want to limit the source space to a certain distance from the sensor, similar to the function of mne .stc_ near_sensors, but it only for ECoG, EEG and DBS sensor data, how can I realize this function? Thanks !